Skip to content

OpenMP flags not added if CXX is set to an absolute path #36

@EmilyBourne

Description

@EmilyBourne

On supercomputers it is common for compiler paths to be set automatically when modules are loaded. They are usually set to an absolute path in case there are multiple versions of the same compiler installed.

The Makefile does not take this into consideration when deciding which flags to use:

hptt/Makefile

Lines 4 to 10 in 9425386

ifeq ($(CXX),icpc)
CXX_FLAGS += -qopenmp -xhost
else
ifeq ($(CXX),g++)
CXX_FLAGS += -fopenmp -march=native
else
ifeq ($(CXX),clang++)

as a result OpenMP flags are not added. A similar problem would occur if the compiler was set to a specific version (e.g. g++-13). The Makefile should probably use $(findstring find,in) instead to avoid such errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions