Skip to content

Commit

Permalink
Fix macOS MPI link flags; upgrade Intel oneAPI; MSMPI CI crash
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed Dec 13, 2023
1 parent 4c1a93f commit 07bf22c
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 42 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,14 @@ jobs:
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
timeout-minutes: 1
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
- name: (Ubuntu) Install Intel oneAPI
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi intel-oneapi-mpi-devel intel-oneapi-mkl ninja-build
timeout-minutes: 15
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2023.1.0 intel-oneapi-compiler-fortran-2023.1.0 intel-oneapi-mpi-devel ninja-build

- name: (Ubuntu) Setup Intel oneAPI environment
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
Expand Down Expand Up @@ -152,6 +150,7 @@ jobs:
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
run: |
echo "C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "/c/Program Files/Microsoft MPI/Bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: (Windows) load OneAPI environment variables
Expand Down Expand Up @@ -216,9 +215,9 @@ jobs:
if: contains(matrix.mpi,'intel')
shell: bash
run: |
echo "FPM_FC=ifort" >> $GITHUB_ENV
echo "FPM_CC=icc" >> $GITHUB_ENV
echo "FPM_CXX=icpc" >> $GITHUB_ENV
echo "FPM_FC=ifx" >> $GITHUB_ENV
echo "FPM_CC=icx" >> $GITHUB_ENV
echo "FPM_CXX=icpx" >> $GITHUB_ENV
- name: (macOS) Use gcc/g++ instead of Clang for C/C++
if: contains(matrix.os,'macOS')
Expand Down
2 changes: 2 additions & 0 deletions fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ fortran-regex.git = "https://github.com/perazz/fortran-regex"
fortran-regex.tag = "1.1.2"
jonquil.git = "https://github.com/toml-f/jonquil"
jonquil.rev = "4fbd4cf34d577c0fd25e32667ee9e41bf231ece8"
fortran-shlex.git = "https://github.com/perazz/fortran-shlex"
fortran-shlex.tag = "1.0.1"

[[test]]
name = "cli-test"
Expand Down
5 changes: 4 additions & 1 deletion src/fpm_compiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ module fpm_compiler
flag_intel_fixed_form = " -fixed", &
flag_intel_standard_compliance = " -standard-semantics"

character(*), parameter :: &
flag_intel_llvm_check = " -check all,nouninit"

character(*), parameter :: &
flag_intel_backtrace_win = " /traceback", &
flag_intel_warn_win = " /warn:all", &
Expand Down Expand Up @@ -421,7 +424,7 @@ subroutine get_debug_compile_flags(id, flags)
case(id_intel_llvm_nix)
flags = &
flag_intel_warn//&
flag_intel_check//&
flag_intel_llvm_check//&
flag_intel_limit//&
flag_intel_debug//&
flag_intel_byterecl//&
Expand Down
12 changes: 7 additions & 5 deletions src/fpm_environment.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ integer function get_os_type() result(r)
!! found on specific system types only.
!!
!! Returns OS_UNKNOWN if the operating system cannot be determined.
character(len=32) :: val
integer :: length, rc
logical :: file_exists
logical, save :: first_run = .true.
integer, save :: ret = OS_UNKNOWN
character(len=255) :: val
integer :: length, rc
logical :: file_exists
logical, save :: first_run = .true.
integer, save :: ret = OS_UNKNOWN
!$omp threadprivate(ret, first_run)

if (.not. first_run) then
Expand All @@ -50,6 +50,8 @@ integer function get_os_type() result(r)

first_run = .false.
r = OS_UNKNOWN
length = 0
rc = 0

! Check environment variable `OSTYPE`.
call get_environment_variable('OSTYPE', val, length, rc)
Expand Down
2 changes: 1 addition & 1 deletion src/fpm_filesystem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ end function unix_path
!! integer :: iostat
!! character(len=:),allocatable :: line, iomsg
!! open(unit=stdin,pad='yes')
!! INFINITE: do
!! INFINITE: do
!! call getline(stdin,line,iostat,iomsg)
!! if(iostat /= 0) exit INFINITE
!! write(*,'(a)')'['//line//']'
Expand Down
Loading

0 comments on commit 07bf22c

Please sign in to comment.