From 6bdf83df3270be867e652ec8afc4433fb9a32fee Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 20 Apr 2021 21:52:39 +0200 Subject: [PATCH 01/12] Add mixed clang/ifort build on OSX based on https://github.com/oneapi-src/oneapi-ci --- azure-pipelines.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68e48437f7..69f0fce588 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -97,4 +97,42 @@ jobs: brew tap LouisBrunner/valgrind brew install --HEAD LouisBrunner/valgrind/valgrind make TARGET=SANDYBRIDGE NO_AVX512=1 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 DYNAMIC_LIST=SANDYBRIDGE DEBUG=1 NO_PARALLEL_MAKE=1 CC=/usr/local/opt/llvm/bin/clang FC=gfortran-10 - cd ctest; OMP_NUM_THREADS=1 valgrind ./xscblat2 Date: Tue, 20 Apr 2021 22:17:22 +0200 Subject: [PATCH 02/12] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 69f0fce588..289b02200b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -127,7 +127,7 @@ jobs: path: /opt/intel/oneapi key: '"install" | "$(MACOS_HPCKIT_URL)" | "$(MACOS_FORTRAN_COMPONENTS)"' cacheHitVar: CACHE_RESTORED - - script: + - script: | curl --output webimage.dmg --url $(MACOS_HPCKIT_URL) --retry 5 --retry-delay 5 hdiutil attach webimage.dmg sudo /Volumes/"$(basename "$(MACOS_HPCKIT_URL)" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$(MACOS_FORTRAN_COMPONENTS)" --eula=accept --continue-with-optional-error=yes --log-dir=. From eb91a11d65ca7ca33a2eb849707b3b306d9ffa41 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 20 Apr 2021 22:27:13 +0200 Subject: [PATCH 03/12] Update azure-pipelines.yml --- azure-pipelines.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 289b02200b..ecaa2c51fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,15 @@ trigger: branches: include: - develop - +resources: + containers: + - container: oneapi-hpckit + image: intel/oneapi-hpckit:latest + options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so' + - container: oneapi-basekit + image: intel/oneapi-basekit:latest + options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so' + jobs: # manylinux1 is useful to test because the # standard Docker container uses an old version @@ -97,7 +105,7 @@ jobs: brew tap LouisBrunner/valgrind brew install --HEAD LouisBrunner/valgrind/valgrind make TARGET=SANDYBRIDGE NO_AVX512=1 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 DYNAMIC_LIST=SANDYBRIDGE DEBUG=1 NO_PARALLEL_MAKE=1 CC=/usr/local/opt/llvm/bin/clang FC=gfortran-10 - + - job: OSX_Ifort_Clang pool: vmImage: 'macOS-10.15' @@ -106,15 +114,7 @@ jobs: MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17643/m_HPCKit_p_2021.2.0.2903_offline.dmg LIBRARY_PATH: /usr/local/opt/llvm/lib MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler - resources: - containers: - - container: oneapi-hpckit - image: intel/oneapi-hpckit:latest - options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so' - - container: oneapi-basekit - image: intel/oneapi-basekit:latest - options: '-v /usr/bin/sudo:/usr/bin/sudo -v /usr/lib/sudo/libsudo_util.so.0:/usr/lib/sudo/libsudo_util.so.0 -v /usr/lib/sudo/sudoers.so:/usr/lib/sudo/sudoers.so' - steps: + steps: - script: | brew update brew install llvm libomp From 706caff090bbe6c019dff5330ff09aa989883f4d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 20 Apr 2021 22:31:50 +0200 Subject: [PATCH 04/12] Update azure-pipelines.yml --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ecaa2c51fa..88e1efeeaf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -118,7 +118,6 @@ jobs: - script: | brew update brew install llvm libomp - - script: | sudo mkdir -p /opt/intel sudo chown $USER /opt/intel displayName: prepare for cache restore From 7bf98b6a544febb6be4e8cfef4b6d38f914ab939 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 08:04:23 +0200 Subject: [PATCH 05/12] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 88e1efeeaf..03308de76e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,7 +114,7 @@ jobs: MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17643/m_HPCKit_p_2021.2.0.2903_offline.dmg LIBRARY_PATH: /usr/local/opt/llvm/lib MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler - steps: + steps: - script: | brew update brew install llvm libomp From 57737fce1e5fdfeb0dc4834e1ae147befa795ea7 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 08:14:05 +0200 Subject: [PATCH 06/12] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 03308de76e..d0b8ab76ab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -133,5 +133,6 @@ jobs: hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet displayName: install condition: ne(variables.CACHE_RESTORED, 'true') + - script: | make CC=/usr/local/opt/llvm/bin/clang FC=ifort From a2d1be088c2e4c99f6b934b0d24360635468cdab Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 10:12:32 +0200 Subject: [PATCH 07/12] Update azure-pipelines.yml --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d0b8ab76ab..48b5d66b99 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -130,7 +130,9 @@ jobs: curl --output webimage.dmg --url $(MACOS_HPCKIT_URL) --retry 5 --retry-delay 5 hdiutil attach webimage.dmg sudo /Volumes/"$(basename "$(MACOS_HPCKIT_URL)" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$(MACOS_FORTRAN_COMPONENTS)" --eula=accept --continue-with-optional-error=yes --log-dir=. + installer_exit_code=$? hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet + exit $installer_exit_code displayName: install condition: ne(variables.CACHE_RESTORED, 'true') - script: | From fa3d3f94f66cab28374b2705eeb52bf7471f5e4f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 10:45:50 +0200 Subject: [PATCH 08/12] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 48b5d66b99..73107a7a51 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -136,5 +136,6 @@ jobs: displayName: install condition: ne(variables.CACHE_RESTORED, 'true') - script: | + source /opt/intel/oneapi/setvars.sh make CC=/usr/local/opt/llvm/bin/clang FC=ifort From 565f06f3d7551c85deec523ab2f2b589038b0bbd Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 14:01:45 +0200 Subject: [PATCH 09/12] Remove extraneous iibgfortran dependency of ifort builds --- f_check | 4 ---- 1 file changed, 4 deletions(-) diff --git a/f_check b/f_check index 20281ea4d5..2c0d7fcb90 100644 --- a/f_check +++ b/f_check @@ -391,10 +391,6 @@ if ($link ne "") { } -if ($vendor eq "INTEL"){ - $linker_a .= "-lgfortran" -} - if ($vendor eq "FLANG"){ $linker_a .= "-lflang" } From 0ebc842d17ec1c7ac073a9e8a52dc605a975f5ef Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 16:46:04 +0200 Subject: [PATCH 10/12] Update Makefile --- exports/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exports/Makefile b/exports/Makefile index eec0593aa6..ee2af15da8 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -139,9 +139,13 @@ endif ifneq (,$(filter 1 2,$(NOFORTRAN))) #only build without Fortran $(CC) $(CFLAGS) $(LDFLAGS) -all_load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) +else +ifeq ($F_COMPILER, INTEL) + $(FC) $(FFLAGS) $(LDFLAGS) -all-load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def else $(FC) $(FFLAGS) $(LDFLAGS) -all_load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) endif +endif dllinit.$(SUFFIX) : dllinit.c $(CC) $(CFLAGS) -c -o $(@F) -s $< From 5a139794b8431ba33be6953430814fb3ed70da2d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 17:48:04 +0200 Subject: [PATCH 11/12] Update Makefile --- exports/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exports/Makefile b/exports/Makefile index ee2af15da8..903836dd68 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -140,7 +140,7 @@ ifneq (,$(filter 1 2,$(NOFORTRAN))) #only build without Fortran $(CC) $(CFLAGS) $(LDFLAGS) -all_load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) else -ifeq ($F_COMPILER, INTEL) +ifeq ($(F_COMPILER), INTEL) $(FC) $(FFLAGS) $(LDFLAGS) -all-load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def else $(FC) $(FFLAGS) $(LDFLAGS) -all_load -headerpad_max_install_names -install_name "$(CURDIR)/../$(INTERNALNAME)" -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) From 425ee08f8ad5763befdde2a47c9105062b6f3be6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 Apr 2021 21:09:22 +0200 Subject: [PATCH 12/12] Remove valgrind and switch the OSX clang+gfortran build to full DYNAMiC_ARCH --- azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 73107a7a51..56a3fd4aec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -102,9 +102,7 @@ jobs: - script: | brew update brew install llvm libomp - brew tap LouisBrunner/valgrind - brew install --HEAD LouisBrunner/valgrind/valgrind - make TARGET=SANDYBRIDGE NO_AVX512=1 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 DYNAMIC_LIST=SANDYBRIDGE DEBUG=1 NO_PARALLEL_MAKE=1 CC=/usr/local/opt/llvm/bin/clang FC=gfortran-10 + make TARGET=CORE2 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 CC=/usr/local/opt/llvm/bin/clang FC=gfortran-10 - job: OSX_Ifort_Clang pool: