diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index 393335914d..411437d6b8 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -120,14 +120,18 @@ jobs: - name: (Ubuntu) finalize oneAPI environment if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel') run: | - # To run HDF5 with oneAPI, we need to build it from source + # Install MPI + sudo apt-get install -y -q intel-oneapi-mpi-devel ninja-build cmake + source /opt/intel/oneapi/setvars.sh --force + printenv >> $GITHUB_ENV + # To run HDF5 with oneAPI, we need to build it from source. Use CMake to generate pkg-config info curl -O -L https://github.com/HDFGroup/hdf5/archive/refs/tags/snapshot-1.14.tar.gz tar zxf snapshot-1.14.tar.gz cd hdf5-snapshot-1.14 - sh ./autogen.sh - sh ./configure --prefix=/tmp CC="$(which icx)" FC="$(which ifx)" --enable-build-mode=production --enable-fortran + cmake -B build -DCMAKE_Fortran_COMPILER=ifx -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DHDF5_BUILD_FORTRAN=ON -DCMAKE_INSTALL_PREFIX=/usr + cd build make -j - make check -j + sudo make install - name: (Windows) Put MSYS2_MinGW64 on PATH if: contains(matrix.os,'windows') && (!contains(matrix.mpi,'intel')) @@ -224,8 +228,8 @@ jobs: mv $(which fpm) fpm-bootstrap${{ matrix.exe }} echo "BOOTSTRAP=$PWD/fpm-bootstrap" >> $GITHUB_ENV - - name: (macOS) Use gcc/g++ instead of Clang for C/C++ - if: contains(matrix.os,'macOS') + - name: (macOS/Ubuntu) Use gcc/g++ instead of Clang for C/C++ / ifx to build fpm + if: contains(matrix.os,'macOS') || contains(matrix.os,'ubuntu') shell: bash run: | echo "FPM_FC=gfortran-${{ env.GCC_V }}" >> $GITHUB_ENV diff --git a/src/fpm/manifest/profiles.f90 b/src/fpm/manifest/profiles.f90 index f50cf32cff..6b139910d9 100644 --- a/src/fpm/manifest/profiles.f90 +++ b/src/fpm/manifest/profiles.f90 @@ -749,25 +749,25 @@ function get_default_profiles(error) result(default_profiles) & 'ifort', & & OS_ALL, & & flags = ' -fp-model precise -pc64 -align all -error-limit 1 -reentrancy& - & threaded -nogen-interfaces -assume byterecl -standard-semantics', & + & threaded -nogen-interfaces -assume byterecl', & & is_built_in=.true.), & & new_profile('release', & & 'ifort', & & OS_WINDOWS, & & flags = ' /fp:precise /align:all /error-limit:1 /reentrancy:threaded& - & /nogen-interfaces /assume:byterecl /standard-semantics', & + & /nogen-interfaces /assume:byterecl', & & is_built_in=.true.), & & new_profile('release', & & 'ifx', & & OS_ALL, & & flags = ' -fp-model=precise -pc64 -align all -error-limit 1 -reentrancy& - & threaded -nogen-interfaces -assume byterecl -standard-semantics', & + & threaded -nogen-interfaces -assume byterecl', & & is_built_in=.true.), & & new_profile('release', & & 'ifx', & & OS_WINDOWS, & & flags = ' /fp:precise /align:all /error-limit:1 /reentrancy:threaded& - & /nogen-interfaces /assume:byterecl /standard-semantics', & + & /nogen-interfaces /assume:byterecl', & & is_built_in=.true.), & & new_profile('release', & &'nagfor', & @@ -805,28 +805,28 @@ function get_default_profiles(error) result(default_profiles) & new_profile('debug', & & 'ifort', & & OS_ALL, & - & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -standard-semantics -traceback', & + & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -traceback', & & is_built_in=.true.), & & new_profile('debug', & & 'ifort', & & OS_WINDOWS, & & flags = ' /warn:all /check:all /error-limit:1& - & /Od /Z7 /assume:byterecl /standard-semantics /traceback', & + & /Od /Z7 /assume:byterecl /traceback', & & is_built_in=.true.), & & new_profile('debug', & & 'ifx', & & OS_ALL, & - & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -standard-semantics -traceback', & + & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -traceback', & & is_built_in=.true.), & & new_profile('debug', & & 'ifx', & & OS_WINDOWS, & - & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /standard-semantics', & + & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl', & & is_built_in=.true.), & & new_profile('debug', & & 'ifx', & & OS_WINDOWS, & - & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /standard-semantics', & + & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl', & & is_built_in=.true.), & & new_profile('debug', & & 'lfortran', & diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index 718843a3eb..5928ee2fd1 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -309,8 +309,7 @@ subroutine get_release_compile_flags(id, flags) flag_intel_limit//& flag_intel_pthread//& flag_intel_nogen//& - flag_intel_byterecl//& - flag_intel_standard_compliance + flag_intel_byterecl case(id_intel_classic_mac) flags = & @@ -320,8 +319,7 @@ subroutine get_release_compile_flags(id, flags) flag_intel_limit//& flag_intel_pthread//& flag_intel_nogen//& - flag_intel_byterecl//& - flag_intel_standard_compliance + flag_intel_byterecl case(id_intel_classic_windows) flags = & @@ -331,8 +329,7 @@ subroutine get_release_compile_flags(id, flags) flag_intel_limit_win//& flag_intel_pthread_win//& flag_intel_nogen_win//& - flag_intel_byterecl_win//& - flag_intel_standard_compliance_win + flag_intel_byterecl_win case(id_intel_llvm_nix) flags = & @@ -342,8 +339,7 @@ subroutine get_release_compile_flags(id, flags) flag_intel_limit//& flag_intel_pthread//& flag_intel_nogen//& - flag_intel_byterecl//& - flag_intel_standard_compliance + flag_intel_byterecl case(id_intel_llvm_windows) flags = & @@ -353,8 +349,7 @@ subroutine get_release_compile_flags(id, flags) flag_intel_limit_win//& flag_intel_pthread_win//& flag_intel_nogen_win//& - flag_intel_byterecl_win//& - flag_intel_standard_compliance_win + flag_intel_byterecl_win case(id_nag) flags = & @@ -418,7 +413,6 @@ subroutine get_debug_compile_flags(id, flags) flag_intel_limit//& flag_intel_debug//& flag_intel_byterecl//& - flag_intel_standard_compliance//& flag_intel_backtrace case(id_intel_classic_mac) @@ -428,7 +422,6 @@ subroutine get_debug_compile_flags(id, flags) flag_intel_limit//& flag_intel_debug//& flag_intel_byterecl//& - flag_intel_standard_compliance//& flag_intel_backtrace case(id_intel_classic_windows) flags = & @@ -437,7 +430,6 @@ subroutine get_debug_compile_flags(id, flags) flag_intel_limit_win//& flag_intel_debug_win//& flag_intel_byterecl_win//& - flag_intel_standard_compliance_win//& flag_intel_backtrace_win case(id_intel_llvm_nix) flags = & @@ -446,7 +438,6 @@ subroutine get_debug_compile_flags(id, flags) flag_intel_limit//& flag_intel_debug//& flag_intel_byterecl//& - flag_intel_standard_compliance//& flag_intel_backtrace case(id_intel_llvm_windows) flags = & @@ -454,8 +445,7 @@ subroutine get_debug_compile_flags(id, flags) flag_intel_check_win//& flag_intel_limit_win//& flag_intel_debug_win//& - flag_intel_byterecl_win//& - flag_intel_standard_compliance_win + flag_intel_byterecl_win case(id_nag) flags = & flag_nag_debug//& diff --git a/test/fpm_test/test_manifest.f90 b/test/fpm_test/test_manifest.f90 index ddabe3cf49..316508d9bc 100644 --- a/test/fpm_test/test_manifest.f90 +++ b/test/fpm_test/test_manifest.f90 @@ -556,7 +556,7 @@ subroutine test_profiles(error) compiler = 'ifort' call find_profile(package%profiles, profile_name, compiler, 3, profile_found, chosen_profile) if (.not.(chosen_profile%flags.eq.& - ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /standard-semantics /traceback')) then + ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /traceback')) then call test_failed(error, "Failed to load built-in profile "//profile_name) return end if