Skip to content

Commit

Permalink
[omp] in ggttmad fix OMP link flags for clang (madgraph5#578)
Browse files Browse the repository at this point in the history
I added -lomp because "ldd check.exe" showed that libomp was used
  • Loading branch information
valassi committed Feb 24, 2023
1 parent 6d6216d commit 1943097
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ endif
# Set the default OMPFLAGS choice
ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
override OMPFLAGS = # disable OpenMP MT on Intel (ok without nvcc, not ok with nvcc)
else ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang)'),)
override OMPFLAGS = # disable OpenMP MT on clang (not ok without or with nvcc)
else
override OMPFLAGS = -fopenmp
###override OMPFLAGS = # disable OpenMP MT (default before #575)
Expand Down Expand Up @@ -613,8 +611,8 @@ endif
ifneq ($(OMPFLAGS),)
ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
###$(testmain): LIBFLAGS += -qopenmp -static-intel # see https://stackoverflow.com/questions/45909648/explicitly-link-intel-icpc-openmp
else ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang)'),)
###$(testmain): LIBFLAGS += ??? # OpenMP on clang is not yet supported in cudacpp...
else ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang)'),) # see #578
$(testmain): LIBFLAGS += -lomp
else
$(testmain): LIBFLAGS += -lgomp
endif
Expand Down
3 changes: 3 additions & 0 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ endif
ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
override OMPFLAGS = -fopenmp
LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy'
else ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang)'),) # see #578
override OMPFLAGS = -fopenmp
LINKLIBS += -lomp
else
override OMPFLAGS = -fopenmp
endif
Expand Down

0 comments on commit 1943097

Please sign in to comment.