Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3050857
Restore use of Ubuntu-24 flang-latest container
bonachea Aug 3, 2026
9e0cc18
native-multi-image: Adjust testing for allocatable coarrays
bonachea Jul 29, 2026
9355823
native-multi-image: Add initial coverage for intrinsic array coarrays
bonachea Aug 2, 2026
17c16db
native-multi-image: Fix conformance issues, add standalone support
bonachea Aug 3, 2026
2f2923b
native-multi-image: Enable HAVE_COARRAY by default
bonachea Aug 3, 2026
ad4a69a
native-multi-image: strengthen checks for coarray queries
bonachea Aug 3, 2026
17cbb99
native-multi-image: Add basic validation of collective results
bonachea Aug 3, 2026
6096d8a
native-multi-image: Decompose TEAM_QUERIES
bonachea Aug 4, 2026
bae5a75
CI: Add CHANGE TEAM coverage for lfortran-latest
bonachea Aug 4, 2026
b1c021f
native-multi-image: Add coverage for TEAM= in several intrinsics
bonachea Aug 5, 2026
66ebb80
print-native-flags: New program to factor the native test flag comput…
bonachea Aug 6, 2026
a711371
native-multi-image: Add preliminary stand-alone support for CCE
bonachea Aug 6, 2026
9b778c8
native-multi-image: Add preliminary stand-alone support for Intel
bonachea Aug 6, 2026
0a2623a
native-multi-image: Adjust HAVE_ALLOC_COARRAY for LFortran
bonachea Aug 9, 2026
b36fbe2
fpm.toml: Disable auto-executables
bonachea Aug 9, 2026
e7904f2
Use print-native-flags to automatically set native flags for supporte…
bonachea Aug 9, 2026
9bc6dd3
CI: issues 205953 and 214080 have been fixed in flang-latest
bonachea Aug 10, 2026
d725b1f
app/Makefile: Add command-line override for FC
bonachea Aug 10, 2026
da54187
CI: Ensure we catch failures of native-image-test
bonachea Aug 11, 2026
36ffa96
CI: Update flang-latest to 23.1.0-RC3
bonachea Aug 12, 2026
beffe8a
CI: Add coverage for LFortran COSHAPE
bonachea Aug 13, 2026
b76ecdd
native-multi-image: workaround LFortran issue 12538
bonachea Aug 18, 2026
903faa8
Apply suggestions from code review
bonachea Aug 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 16 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ jobs:
- os: ubuntu-24.04
compiler: flang
version: latest
#container: snowstep/llvm:ubuntu-24.04-latest
container: snowstep/llvm:debian-12-latest
container: snowstep/llvm:ubuntu-24.04-latest
#container: snowstep/llvm:debian-12-latest

# https://hub.docker.com/r/phhargrove/llvm-flang/tags
- os: ubuntu-24.04
compiler: flang
version: 23
container: phhargrove/llvm-flang:23.1.0_rc2-latest
container: phhargrove/llvm-flang:23.1.0_rc3-latest
- os: ubuntu-24.04
compiler: flang
version: 22
Expand All @@ -141,15 +141,11 @@ jobs:
compiler: lfortran
version: latest
container: ghcr.io/lfortran/lfortran:latest
native_multi_image: true
FFLAGS: --coarray=true -DHAVE_TEAM=0 -DHAVE_TEAM_TYPE -DHAVE_FORM_TEAM -DHAVE_SYNC_TEAM -DHAVE_COARRAY -DHAVE_ALLOC_COARRAY=0 -DHAVE_COARRAY_QUERY=0 -DHAVE_COBOUND -DHAVE_EVENT=0 -DHAVE_LOCK_TYPE=0 -DHAVE_NOTIFY_TYPE=0

- os: ubuntu-22.04
compiler: lfortran
version: 0.64
container: ghcr.io/lfortran/lfortran:v0.64.0
native_multi_image: true
FFLAGS: --coarray=true -DHAVE_TEAM=0 -DHAVE_COARRAY -DHAVE_ALLOC_COARRAY=0 -DHAVE_COARRAY_QUERY=0 -DHAVE_EVENT=0 -DHAVE_LOCK_TYPE=0 -DHAVE_NOTIFY_TYPE=0

- os: ubuntu-22.04
compiler: lfortran
Expand Down Expand Up @@ -233,23 +229,20 @@ jobs:
compiler: flang
version: 23
network: udp
container: phhargrove/llvm-flang:23.1.0_rc2-latest
container: phhargrove/llvm-flang:23.1.0_rc3-latest
- os: ubuntu-24.04
compiler: flang
version: latest
network: udp
#container: snowstep/llvm:ubuntu-24.04-latest
container: snowstep/llvm:debian-12-latest
container: snowstep/llvm:ubuntu-24.04-latest
#container: snowstep/llvm:debian-12-latest

container:
image: ${{ matrix.container }}
options: --shm-size=2gb

env:
COMPILER_VERSION: ${{ matrix.version || needs.setup.outputs.BREW_FLANG_VERSION }}
NATIVE_MULTI_IMAGE: ${{ matrix.native_multi_image ||
( matrix.compiler == 'flang' && ( ! matrix.version || matrix.version >= 22 || matrix.version == 'latest' ) )
}}
FFLAGS: ${{ matrix.FFLAGS }} ${{ inputs.fflags }}
CFLAGS: ${{ matrix.CFLAGS }} ${{ inputs.cflags }}
PREFIX: install
Expand Down Expand Up @@ -359,15 +352,6 @@ jobs:
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
fi
if [ "${NATIVE_MULTI_IMAGE}" == true ] ; then
if [[ $COMPILER_VERSION == latest ]] ; then
echo "FFLAGS=$FFLAGS -fcoarray -DHAVE_COARRAY -DHAVE_ALLOC_COARRAY=0 -DHAVE_COARRAY_INIT=0 -DHAVE_COARRAY_LOCAL_ACCESS=0 -DHAVE_PUTGET=0 -DHAVE_EVENT=0 -DHAVE_EVENT_TYPE -DIGNORE_FAILURES=6" >> "$GITHUB_ENV"
elif [[ $COMPILER_VERSION == 23 ]] ; then
echo "FFLAGS=$FFLAGS -fcoarray -DHAVE_COARRAY -DHAVE_ALLOC_COARRAY=0 -DHAVE_COARRAY_INIT=0 -DHAVE_COARRAY_LOCAL_ACCESS=0 -DHAVE_PUTGET=0 -DHAVE_EVENT=0 -DHAVE_EVENT_TYPE -DIGNORE_FAILURES=6" >> "$GITHUB_ENV"
else # $COMPILER_VERSION == 22
echo "FFLAGS=$FFLAGS -fcoarray -DHAVE_EVENT_TYPE -DIGNORE_FAILURES=8" >> "$GITHUB_ENV"
fi
fi

- name: Setup lfortran dependencies and variables
if: ${{ matrix.compiler == 'lfortran' }}
Expand Down Expand Up @@ -399,12 +383,6 @@ jobs:
if test "${{ matrix.network }}" = "udp"; then
echo "GASNET_SUPERNODE_MAXSIZE=1" >> "$GITHUB_ENV"
fi
# Turn some knobs for a compiler that natively uses PRIF for multi-image features:
# HAVE_MULTI_IMAGE : controls app/native-multi-image and prif_init testing
# HAVE_MULTI_IMAGE_SUPPORT : force-enable Julienne's multi-image support
if [ "${NATIVE_MULTI_IMAGE}" == true ] ; then
echo "FFLAGS=$FFLAGS -DHAVE_MULTI_IMAGE -DHAVE_MULTI_IMAGE_SUPPORT" >> "$GITHUB_ENV"
fi

- name: Set Workflow Dispatch Environment
if: github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -451,6 +429,9 @@ jobs:
eval echo "$var=\$$var"; done
./install.sh --prefix=${PREFIX} ${NETWORK_ARG} --verbose \
${{ inputs.install_args }} ${{ matrix.install_filter }}
if ! grep -q 'NATIVEFLAGS=""' run-fpm.sh ; then
echo "NATIVE_MULTI_IMAGE=true" >> "$GITHUB_ENV"
fi

##########################################################################
# Caffeine Testing
Expand All @@ -464,15 +445,21 @@ jobs:
echo CAF_IMAGES=${CAF_IMAGES}
./run-fpm.sh run --verbose --example hello

- name: Run native multi-image test
- name: Run native multi-image test (with Caffeine)
if: ${{ env.NATIVE_MULTI_IMAGE == 'true' }}
run: |
./run-fpm.sh run --verbose 2>&1 | tee output
test ${PIPESTATUS[0]} = 0
if [[ "${{ matrix.network }}" != "udp" ]] ; then
# ignore intermittent INEXACT exceptions from AMUDP at exit time
! grep -q "IEEE arithmetic exceptions signaled" output
fi

- name: Run native multi-image test (stand-alone)
if: ${{ matrix.compiler == 'gfortran' && matrix.version >= '16' }}
run: |
make -C app gcc GFORTRAN=$FC

- name: Run unit tests
run: |
while (( CAF_IMAGES > 0 )); do
Expand Down
60 changes: 60 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This Makefile is for internal testing use only and not intended for end-users
# To run this test with Caffeine, please execute `./run-fpm.sh run` in the top-level directory

# overridable settings
NUM_IMAGES?=4
FLAGS=
NATIVE_FLAGS=$$($(MAKE) --no-print-directory print-flags FC=$$FC)
GFORTRAN=gfortran
FC_FORCE=

# ----------------------------------------------------------------

SHELL = bash

all: gcc

print-flags:
@$$FC print-native-flags.F90 -o print-native-flags
@./print-native-flags -s
@rm -f print-native-flags

gcc:
@set -x ; \
export FC=$(if $(FC_FORCE),$(FC_FORCE),$(GFORTRAN)) ; \
export NATIVE_FLAGS="$(NATIVE_FLAGS)" && \
$$FC -g -fcoarray=lib $$NATIVE_FLAGS $(FLAGS) \
native-multi-image.F90 -o native-multi-image-gcc -lcaf_shmem
env GFORTRAN_NUM_IMAGES=$(NUM_IMAGES) ./native-multi-image-gcc

nag:
@set -x ; \
export FC=$(if $(FC_FORCE),$(FC_FORCE),nagfor) ; \
export NATIVE_FLAGS="$(NATIVE_FLAGS)" && \
$(GFORTRAN) -E -DNAGFOR $$NATIVE_FLAGS $(FLAGS) \
native-multi-image.F90 > native-multi-image.i.F90 && \
$$FC -u -g -coarray native-multi-image.i.F90 -o native-multi-image-nag
@rm -f native-multi-image.i.F90
env NAGFORTRAN_NUM_IMAGES=$(NUM_IMAGES) ./native-multi-image-nag

cce:
@set -x ; \
export FC=$(if $(FC_FORCE),$(FC_FORCE),ftn) ; \
export NATIVE_FLAGS="$(NATIVE_FLAGS)" && \
$$FC -g -hcaf -O0 $$NATIVE_FLAGS $(FLAGS) \
native-multi-image.F90 -o native-multi-image-cce
./native-multi-image-cce
srun -n $(NUM_IMAGES) ./native-multi-image-cce

intel:
@set -x ; \
export FC=$(if $(FC_FORCE),$(FC_FORCE),ifx) ; \
export NATIVE_FLAGS="$(NATIVE_FLAGS)" && \
$$FC -g -coarray -O0 $$NATIVE_FLAGS $(FLAGS) \
native-multi-image.F90 -o native-multi-image-intel
env FOR_COARRAY_NUM_IMAGES=$(NUM_IMAGES) ./native-multi-image-intel

clean:
rm -f *.mod *.i.F90 native-multi-image-{gcc,nag,cce,intel}

.PHONY: nag gcc clean
Loading