Skip to content

Do not raise "Unrecognized option -x" error if GMT is not compiled with OpenMP/GThreads support? #8300

Closed
@seisman

Description

@seisman

The -x common option is only available if GMT is compiled with OpenMP/GThreads support. If not, using -x gives the error: Unrecognized option -x. Users may be surprised why a script works on machine A but gives such an error on machine B. After reading the documentation or the man page, they may realize that GMT on machine B is not compiled with parallel support. Then users have to modify their working script unless they're unable to install another parallel-enabled GMT.

So, instead of giving the "Unrecognized option -x" error, we can make it always available.

  • If GMT is compiled with parallel support, then everything works as before
  • If GMT is NOT compiled with parallel support, then raise a WARNING and fallback to one core

In this way,

  1. the warning message can clearly explain that the GMT is not parallel-enabled
  2. users don't have to modify their working script if they don't care about parallel
  3. the synopsis message can also be simplified (i.e., GMT_x_OPT, GMT_ADD_x_OPT)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions