Skip to content

Commit 706464f

Browse files
authored
Merge pull request #55 from bonachea/ci-intel
Fixes for Intel oneAPI 2025
2 parents 72a1a89 + cb9f55b commit 706464f

File tree

5 files changed

+30
-21
lines changed

5 files changed

+30
-21
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ jobs:
3131
# version: new
3232
# container: gmao/llvm-flang:latest
3333
# extra_flags: -g
34+
- os: ubuntu-24.04
35+
compiler: ifx
36+
version: 2025.1.0
37+
error_stop_code: 128
38+
extra_flags: -g
39+
container: intel/fortran-essentials:2025.1.0-0-devel-ubuntu24.04
40+
#container: intel/oneapi-hpckit:2025.1.0-0-devel-ubuntu24.04
41+
- os: ubuntu-22.04
42+
compiler: ifx
43+
version: 2025.0.0
44+
error_stop_code: 128
45+
extra_flags: -g
46+
container: intel/fortran-essentials:2025.0.0-0-devel-ubuntu22.04
3447

3548
exclude:
3649
- os: ubuntu-22.04
@@ -64,9 +77,16 @@ jobs:
6477
set -x
6578
if test "$FC" = "flang" ; then \
6679
echo "FPM_FC=flang-new" >> "$GITHUB_ENV" ; \
80+
elif test "$FC" = "ifx" ; then \
81+
echo "FPM_FC=ifx" >> "$GITHUB_ENV" ; \
6782
else \
6883
echo "FPM_FC=gfortran-${GCC_VERSION}" >> "$GITHUB_ENV" ; \
6984
fi
85+
if test -n "${{ matrix.error_stop_code }}" ; then \
86+
echo "ERROR_STOP_CODE=${{ matrix.error_stop_code }}" >> "$GITHUB_ENV" ; \
87+
else \
88+
echo "ERROR_STOP_CODE=1" >> "$GITHUB_ENV" ; \
89+
fi
7090
7191
- name: Setup FPM
7292
uses: fortran-lang/setup-fpm@main
@@ -105,7 +125,7 @@ jobs:
105125
run: |
106126
set -x
107127
fpm test ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }}"
108-
( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }}" ; test $? = 1 )
109-
( set +e ; fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }}" ; test $? = 1 )
128+
( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }}" ; test $? = $ERROR_STOP_CODE )
129+
( set +e ; fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }}" ; test $? = $ERROR_STOP_CODE )
110130
111131

example/support-assert-test-suite/check-exit-status.f90

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/assert/assert_subroutine_s.F90

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
module procedure assert_always
2525
use characterizable_m, only : characterizable_t
2626

27-
character(len=:), allocatable :: header, trailer
27+
character(len=:), allocatable :: header, trailer, message
2828
integer :: me
2929

3030
check_assertion: &
@@ -39,6 +39,7 @@
3939
header = 'Assertion "' // description // '" failed on image ' // string(me)
4040
#else
4141
header = 'Assertion "' // description // '" failed.'
42+
me = 0 ! avoid a harmless warning
4243
#endif
4344

4445
represent_diagnostics_as_string: &
@@ -68,10 +69,12 @@
6869

6970
end if represent_diagnostics_as_string
7071

72+
message = header // trailer
73+
7174
#if ASSERT_PARALLEL_CALLBACKS
72-
call assert_error_stop(header // trailer)
75+
call assert_error_stop(message)
7376
#else
74-
error stop (header // trailer)
77+
error stop message, QUIET=.false.
7578
#endif
7679

7780
end if check_assertion

test/run-false-assertion-intel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
output=$(fpm run --example false-assertion --compiler ifx --flag '-O3 -DASSERTIONS' > /dev/null 2>&1)
3-
echo $?
3+
echo $? > build/exit_status

test/test-assert-subroutine-error-termination.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ program test_assert_subroutine_error_termination
2323
#elif __flang__
2424
command = "./test/run-false-assertion.sh", &
2525
#elif __INTEL_COMPILER
26-
command = "./test/run-false-assertion-intel.sh | fpm run --example check-exit-status", &
26+
command = "./test/run-false-assertion-intel.sh", &
2727
#elif _CRAYFTN
2828
command = "fpm run --example false-assertion --profile release --compiler crayftn.sh --flag '-DASSERTIONS' > /dev/null 2>&1", &
2929
#else

0 commit comments

Comments
 (0)