OpenMP_VV icon indicating copy to clipboard operation
OpenMP_VV copied to clipboard

[Regression, Build] OpenMP_VV since January breaks testing by overridding the compiler unconditionally

Open tob2 opened this issue 1 year ago • 1 comments

Before the default way of compiling was:

  • Setup a proper .def file for the compiler
  • Run make SYSTEM=myFile.def

But this fails since:

  • commit f89b8a43102a827f279ac155c44eb67ae4f4032b
  • Pull Request #849

Namely, in the Main Makefile there is: https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV/blob/7ca5a2fefe52233b56344c5d62bd1bbac0a35112/Makefile#L21-L28

Thus,

  • First the user-specified *.def file is loaded
  • and then the sys/make/make.def handles the input.

However, since the commit f89b8a43102a827f279ac155c44eb67ae4f4032b the following overrides the user settings:

https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV/blob/7ca5a2fefe52233b56344c5d62bd1bbac0a35112/sys/make/make.def#L70-L72

In our case, we have want to use a specific GCC version, passing a FULL path to that compiler – but the combination of override causes that the compiler is reset — but it does not actually update the user-set compiler flags.

@andrewkallai

tob2 avatar Feb 12 '25 09:02 tob2

In our case, that uses the system GCC which has some basic OpenMP support but not the full one.

Untested patch:

--- a/sys/make/make.def
+++ b/sys/make/make.def
@@ -70,3 +70,6 @@ FC?=none
-override CC := $(notdir $(CC))
-override CXX := $(notdir $(CXX))
-override FC := $(notdir $(FC))
+# Strip directory for matching the configuration below
+# setting values according to the Makefile variable override rules
+# But the full pathname compiler will be used for compilation
+OMPVV_USED_CC := $(notdir $(CC))
+OMPVV_USED_CXX := $(notdir $(CXX))
+OMPVV_USED_FC := $(notdir $(FC))
@@ -83 +86 @@ endif
-ifeq ($(CC), amdclang)
+ifeq ($(OMPVV_USED_CC), amdclang)
@@ -94 +97 @@ endif
-ifeq ($(CC), nvc)
+ifeq ($(OMPVV_USED_CC), nvc)
@@ -104 +107 @@ endif
-ifeq ($(CC), cc)
+ifeq ($(OMPVV_USED_CC), cc)
@@ -114 +117 @@ endif
-ifeq ($(CC), gcc)
+ifeq ($(OMPVV_USED_CC), gcc)
@@ -124 +127 @@ endif
-ifeq ($(CC), $(filter $(CC), xlc xlc_r))
+ifeq ($(OMPVV_USED_CC), $(filter $(OMPVV_USED_CC), xlc xlc_r))
@@ -134 +137 @@ endif
-ifeq ($(CC), $(filter $(CC), icx icpx))
+ifeq ($(OMPVV_USED_CC), $(filter $(OMPVV_USED_CC), icx icpx))
@@ -144 +147 @@ endif
-ifeq ($(CC), clang)
+ifeq ($(OMPVV_USED_CC), clang)
@@ -161 +164 @@ CXX_VERSION?= echo "version unknown"
-ifeq ($(CXX), amdclang++)
+ifeq ($(OMPVV_USED_CXX), amdclang++)
@@ -172 +175 @@ endif
-ifeq ($(CXX), nvc++)
+ifeq ($(OMPVV_USED_CXX), nvc++)
@@ -182 +185 @@ endif
-ifeq ($(CXX), CC)
+ifeq ($(OMPVV_USED_CXX), CC)
@@ -191 +194 @@ endif
-ifeq ($(CXX), g++)
+ifeq ($(OMPVV_USED_CXX), g++)
@@ -201 +204 @@ endif
-ifeq ($(CXX), $(filter $(CXX), xlc++ xlc++_r))
+ifeq ($(OMPVV_USED_CXX), $(filter $(OMPVV_USED_CXX), xlc++ xlc++_r))
@@ -211 +214 @@ endif
-ifeq ($(CXX), icpx)
+ifeq ($(OMPVV_USED_CXX), icpx)
@@ -221 +224 @@ endif
-ifeq ($(CXX), clang++)
+ifeq ($(OMPVV_USED_CXX), clang++)
@@ -237 +240 @@ F_VERSION?= echo "version unknown"
-ifeq ($(FC), amdflang)
+ifeq ($(OMPVV_USED_FX), amdflang)
@@ -247 +250 @@ endif
-ifeq ($(FC), nvfortran)
+ifeq ($(OMPVV_USED_FX), nvfortran)
@@ -257 +260 @@ endif
-ifeq ($(FC), ftn)
+ifeq ($(OMPVV_USED_FX), ftn)
@@ -267 +270 @@ endif
-ifeq ($(FC), gfortran)
+ifeq ($(OMPVV_USED_FX), gfortran)
@@ -278 +281 @@ endif
-ifeq ($(FC), $(filter $(FC), xlf xlf_r))
+ifeq ($(OMPVV_USED_FX), $(filter $(OMPVV_USED_FX), xlf xlf_r))
@@ -288 +291 @@ endif
-ifeq ($(FC), $(filter $(FC), ifx ifort))
+ifeq ($(OMPVV_USED_FX), $(filter $(OMPVV_USED_FX), ifx ifort))
@@ -298 +301 @@ endif
-ifeq ($(FC), $(filter $(FC), flang flang-new))
+ifeq ($(OMPVV_USED_FX), $(filter $(OMPVV_USED_FX), flang flang-new))

tob2 avatar Feb 12 '25 09:02 tob2

Closed with #870

andrewkallai avatar May 08 '25 17:05 andrewkallai