Skip to content

Commit a32e5fd

Browse files
committed
Update cis. Fix uninstall.
1 parent e17151c commit a32e5fd

File tree

4 files changed

+35
-10
lines changed

4 files changed

+35
-10
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,29 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
fail-fast: true
10+
matrix:
11+
mpi: [ 'openmpi', 'impi' ]
12+
# mpi: [ 'mpich', 'openmpi', 'impi' ]
13+
# mpich is borken on ubuntu-24.04LTS and 24.10 see https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
1014

1115
env:
1216
FC: gfortran
13-
GCC_V: 11
17+
GCC_V: 13
1418

1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@v3
1822

1923
- name: Install Dependencies
2024
run: |
21-
sudo apt install -y gfortran-${GCC_V} cmake mpich
25+
sudo apt install -y gfortran-${GCC_V} cmake
2226
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
2327
28+
- name: Setup MPI ${{ matrix.mpi }}
29+
uses: mpi4py/setup-mpi@v1
30+
with:
31+
mpi: ${{ matrix.mpi }}
32+
2433
- name: Build and Test
2534
run: |
2635
mkdir build
@@ -30,3 +39,4 @@ jobs:
3039
ctest --test-dir build --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
3140
cd build
3241
make uninstall
42+
echo "Ran with mpi: ${{ matrix.mpi }}"

.github/workflows/win-ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,23 @@ jobs:
4242
ls "${I_MPI_ROOT}/bin"
4343
ls "${I_MPI_ROOT}"
4444
ls "${I_MPI_ROOT}/lib"
45-
mpifc.bat -show
46-
mpicc.bat -show
45+
ls "${I_MPI_ROOT}/env"
46+
# cat "${I_MPI_ROOT}/bin/mpifc.bat"
47+
# mpifc.bat -show
48+
# mpicc.bat -show
4749
mpifc.bat -version || echo "ifort not installed"
4850
mpicc.bat -version || echo "icc not installed"
4951
set +o verbose
52+
# echo The following environment variables are used:
53+
# echo CMPLR_ROOT Intel^(R^) Compiler installation directory path
54+
# echo I_MPI_ROOT Intel^(R^) MPI Library installation directory path
55+
# echo I_MPI_{FC,F77,F90} or MPICH_{FC,F77,F90}
56+
# echo the path/name of the underlying compiler to be used.
57+
# echo I_MPI_{FC,F77,F90}_PROFILE or MPI{FC,F77,F90}_PROFILE
58+
# echo name of profile file ^(without extension^)
59+
# echo I_MPI_COMPILER_CONFIG_DIR
60+
# echo folder which contains configuration files *.conf
61+
# echo VT_ROOT Intel^(R^) Trace Collector installation directory path
5062
5163
- name: Build and Test
5264
run: |

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,18 +734,21 @@ function(add_caf_test name num_caf_img test_target)
734734
endif()
735735
# Add a host file for OMPI
736736
get_property(openmpi GLOBAL PROPERTY openmpi)
737+
get_property(N_CPU GLOBAL PROPERTY N_CPU)
737738
if ( openmpi )
738-
set(test_parameters --hostfile ${CMAKE_BINARY_DIR}/hostfile)
739+
# OpenMPIs decision when a host is oversubscribed in ctest is indeterministic
740+
# Therefore always add --oversubscribe to prevent test failures.
741+
set(test_parameters --hostfile ${CMAKE_BINARY_DIR}/hostfile --oversubscribe)
739742
endif()
740-
if ( ((N_CPU LESS num_caf_img) OR (N_CPU EQUAL 0)) )
743+
if ( ( N_CPU LESS_EQUAL num_caf_img ) OR ( N_CPU EQUAL 0 ) )
741744
message(STATUS "Test ${name} is oversubscribed: ${num_caf_img} CAF images requested with ${N_CPU} system processor available.")
742745
if ( openmpi )
743746
if (min_test_imgs)
744747
set( num_caf_img ${min_test_imgs} )
745748
elseif ( N_CPU LESS 2 )
746749
set( num_caf_img 2 )
747750
endif()
748-
set (test_parameters ${test_parameters} --oversubscribe)
751+
# set (test_parameters ${test_parameters} --oversubscribe)
749752
message( STATUS "Open-MPI back end detected, passing --oversubscribe for oversubscribed test, ${name}, with ${num_caf_img} ranks/images." )
750753
endif()
751754
endif()

cmake/uninstall.cmake.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ endforeach()
1717
foreach(file ${files})
1818
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
1919
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
20-
exec_program(
21-
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
20+
execute_process(
21+
COMMAND "@CMAKE_COMMAND@" -E remove \"$ENV{DESTDIR}${file}\"
2222
OUTPUT_VARIABLE rm_out
23-
RETURN_VALUE rm_retval
23+
RESULT_VARIABLE rm_retval
2424
)
2525
if(NOT "${rm_retval}" STREQUAL 0)
2626
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")

0 commit comments

Comments
 (0)