Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 15 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ jobs:
container: snowstep/llvm:ubuntu-22.04-latest

# https://hub.docker.com/r/phhargrove/llvm-flang/tags
- os: ubuntu-24.04-arm
compiler: flang
version: 23
container: phhargrove/llvm-flang:23.1.0-latest-arm64

- os: ubuntu-24.04
compiler: flang
version: 23
Expand Down Expand Up @@ -133,10 +138,6 @@ jobs:
compiler: lfortran
version: 0.62.0
container: phhargrove/lfortran:0.62.0-1
- os: ubuntu-24.04
compiler: lfortran
version: 0.63.0
container: phhargrove/lfortran:0.63.0-1

# https://github.com/lfortran/lfortran/pkgs/container/lfortran
- os: ubuntu-22.04
Expand All @@ -151,6 +152,10 @@ jobs:
compiler: lfortran
version: 0.65.0
container: ghcr.io/lfortran/lfortran:v0.65.0
- os: ubuntu-22.04
compiler: lfortran
version: 0.66.0
container: ghcr.io/lfortran/lfortran:v0.66.0
- os: ubuntu-22.04
compiler: lfortran
version: latest
Expand Down Expand Up @@ -248,12 +253,12 @@ jobs:
echo "FPM_FC=ifx" >> "$GITHUB_ENV"
if [[ "$COMPILER_VERSION" = "latest-coarray" ]] ; then
echo "FOR_COARRAY_NUM_IMAGES=4" >> "$GITHUB_ENV"
echo "FFLAGS=-coarray -fpp -g -traceback $FFLAGS" >> "$GITHUB_ENV"
echo "FFLAGS=-coarray -g -traceback $FFLAGS" >> "$GITHUB_ENV"
#echo "FOR_COARRAY_MPI_VERBOSE=1" >> "$GITHUB_ENV"
#echo "FOR_COARRAY_DEBUG_STARTUP=1" >> "$GITHUB_ENV"
else
# issue #162: ifx coarray support is usually disabled because it hides runtime failures
echo "FFLAGS=-DHAVE_MULTI_IMAGE_SUPPORT=0 -fpp -g -traceback $FFLAGS" >> "$GITHUB_ENV"
echo "FFLAGS=-DHAVE_MULTI_IMAGE_SUPPORT=0 -g -traceback $FFLAGS" >> "$GITHUB_ENV"
fi
elif test "$FC" = "lfortran" ; then
echo "FPM_FC=lfortran" >> "$GITHUB_ENV"
Expand All @@ -278,10 +283,11 @@ jobs:
if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}
run: |
export FPM_VERSION=0.13.0
mkdir -p fpm-temp/bin
cd fpm-temp
curl --retry 5 -LOsS https://github.com/fortran-lang/fpm/releases/download/v$FPM_VERSION/fpm-$FPM_VERSION.F90
mkdir fpm-temp
gfortran-14 -o fpm-temp/fpm fpm-$FPM_VERSION.F90
echo "PATH=`pwd`/fpm-temp:${PATH}" >> "$GITHUB_ENV"
gfortran-14 -o bin/fpm fpm-$FPM_VERSION.F90
echo "PATH=$PWD/bin:${PATH}" >> "$GITHUB_ENV"

- name: Version info
run: |
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,22 @@ With `fpm` versions older than 0.13.0, replace `flang` with `flang-new` below.

Compiler/Runtime |Tested Versions|Run Type|Example build/test commands (parallel examples use 2 images)
------------------|---------------|--------|------------------------------------------------------------
LLVM/[Caffeine] |22 |parallel|`fpm test --compiler flang --flag "-O3 -DHAVE_MULTI_IMAGE_SUPPORT -fcoarray" --link-flag "-lcaffeine -lgasnet-smp-seq -L<caffeine-prefix>/lib"`
LLVM/[Caffeine] |22 |parallel|`fpm test --compiler flang --flag "-O3 -DHAVE_MULTI_IMAGE_SUPPORT -fcoarray -DASSERT_MULTI_IMAGE" --link-flag "-lcaffeine -lgasnet-smp-seq -L<caffeine-prefix>/lib"` (\*)
LLVM |20-22 |serial |`fpm test --compiler flang --flag -O3`
LLVM |19 (+) |serial |`fpm test --compiler flang --flag "-O3 -mmlir -allow-assumed-rank"`
GCC/[OpenCoarrays]|14-15 |parallel|`fpm test --compiler caf --runner "cafrun -n 2" --profile release`
GCC/[OpenCoarrays]|13 |parallel|`fpm test --compiler caf --runner "cafrun -n 2" --profile release --flag -ffree-line-length-none`
GCC |14-16 |serial |`fpm test --compiler gfortran --profile release`
GCC |13 |serial |`fpm test --compiler gfortran --profile release --flag -ffree-line-length-none`
Intel |2025.2-2026.0 |parallel|`FOR_COARRAY_NUM_IMAGES=2 fpm test --compiler ifx --flag "-fpp -O3 -coarray" --profile release`
Intel |2025.2-2026.0 |parallel|`FOR_COARRAY_NUM_IMAGES=2 fpm test --compiler ifx --flag "-O3 -coarray" --profile release`
LFortran |0.61-0.63 |serial |`fpm test --compiler lfortran --flag "--cpp --realloc-lhs-arrays --separate-compilation"`
NAG |7.2 (-) |parallel|`NAGFORTRAN_NUM_IMAGES=2 fpm test --compiler nagfor --flag "-O4 -fpp -coarray"`
NAG |7.2 (-) |parallel|`NAGFORTRAN_NUM_IMAGES=2 fpm test --compiler nagfor --flag "-O1 -coarray"`

(+) Support for LLVM flang version 19 is deprecated, and may be removed in a future release.
(-) Using NAG on macOS requires an `fpm` installation containing [PR 1312](https://github.com/fortran-lang/fpm/pull/1312)
> (\*) Additional linker options might be required depending on platform.
On Linux, it may be necessary to prepend `-Wl,--start-group` to `--link-flag`, or manually add the libraries
to fpm.toml.
> (+) Support for LLVM flang version 19 is deprecated, and may be removed in a future release.
> (-) Using NAG on macOS requires an `fpm` installation containing [PR 1312](https://github.com/fortran-lang/fpm/pull/1312)

The test output reports a test as skipped if there is a known issue that blocks
the tested feature with the chosen compiler version or platform. Due to a
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion example/pure-printing/pure-stop-and-print.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2026, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

program pure_stop_and_print
#if HAVE_STOP_AND_PRINT_SUPPORT
Expand Down
9 changes: 5 additions & 4 deletions example/pure-printing/write_stuff_m.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
! Copyright (c) 2024-2026, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

#if HAVE_STOP_AND_PRINT_SUPPORT
module write_stuff_m
#if HAVE_STOP_AND_PRINT_SUPPORT
!! Demonstrate a derived type that is writable to a stop via Julienne's stop_and_print utility
use julienne_m, only : writable_t
implicit none
Expand All @@ -27,6 +27,7 @@ module subroutine write_formatted(self, unit, edit_descriptor, v_list, iostat, i
end subroutine

end interface

end module
#else
EMPTY_MODULE_ANCESTOR
#endif
end module
9 changes: 5 additions & 4 deletions example/pure-printing/write_stuff_s.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
! Copyright (c) 2024-2026, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

#if HAVE_STOP_AND_PRINT_SUPPORT
submodule(write_stuff_m) write_stuff_s
#if HAVE_STOP_AND_PRINT_SUPPORT
implicit none

contains
Expand All @@ -16,6 +16,7 @@
write(unit,'(a)' ) "}" // new_line('')
iostat = 0
end procedure

end submodule
#else
EMPTY_MODULE_SUBMODULE
#endif
end submodule
2 changes: 1 addition & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "julienne"

[dependencies]
assert = {git = "https://github.com/berkeleylab/assert", tag = "3.1.2"}
assert = {git = "https://github.com/berkeleylab/assert", tag = "3.2.0"}

[install]
library = true
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@
# endif
#endif

! Incantation to allow a conforming empty module and submodule
#define EMPTY_MODULE_ANCESTOR private ; interface ; module subroutine dummy ; end subroutine ; end interface
#define EMPTY_MODULE_SUBMODULE contains ; module procedure dummy ; end procedure

#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/julienne/julienne_command_line_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2026, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

submodule(julienne_command_line_m) julienne_command_line_s
implicit none
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/julienne/julienne_multi_image_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ function julienne_this_image_interface() result(this_image_id)
integer :: this_image_id
end function
end interface
procedure(julienne_this_image_interface), pointer :: julienne_this_image
procedure(julienne_this_image_interface), pointer :: julienne_this_image => null()

abstract interface
function julienne_num_images_interface() result(image_count)
implicit none
integer :: image_count
end function
end interface
procedure(julienne_num_images_interface), pointer :: julienne_num_images
procedure(julienne_num_images_interface), pointer :: julienne_num_images => null()

abstract interface
subroutine julienne_sync_all_interface()
implicit none
end subroutine
end interface
procedure(julienne_sync_all_interface), pointer :: julienne_sync_all
procedure(julienne_sync_all_interface), pointer :: julienne_sync_all => null()

abstract interface
subroutine julienne_co_sum_integer_interface(a, result_image)
Expand All @@ -75,15 +75,15 @@ subroutine julienne_co_sum_integer_interface(a, result_image)
integer, intent(in), optional :: result_image
end subroutine
end interface
procedure(julienne_co_sum_integer_interface), pointer :: julienne_co_sum_integer
procedure(julienne_co_sum_integer_interface), pointer :: julienne_co_sum_integer => null()

abstract interface
pure subroutine julienne_error_stop_interface(stop_code_char)
implicit none
character(len=*), intent(in) :: stop_code_char
end subroutine
end interface
procedure(julienne_error_stop_interface), pointer :: julienne_error_stop
procedure(julienne_error_stop_interface), pointer :: julienne_error_stop => null()
#endif


Expand Down
8 changes: 4 additions & 4 deletions src/julienne/julienne_multi_image_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"
#include "assert_macros.h"

submodule(julienne_multi_image_m) julienne_multi_image_s
Expand Down Expand Up @@ -46,7 +46,7 @@
if (associated(julienne_sync_all)) then
call julienne_sync_all()
else
; ! assume single-image, no-op
! assume single-image, no-op
call_assert(internal_num_images() == 1)
end if
# else
Expand All @@ -61,7 +61,7 @@
if (associated(julienne_co_sum_integer)) then
call julienne_co_sum_integer(a, result_image)
else
; ! assume single-image, no-op
! assume single-image, no-op
call_assert(internal_num_images() == 1)
end if
# else
Expand All @@ -79,7 +79,7 @@
if (associated(julienne_error_stop)) then
call julienne_error_stop(stop_code_char)
else
; ! deliberate fall-thru
! deliberate fall-thru
end if
# endif
error stop stop_code_char
Expand Down
10 changes: 5 additions & 5 deletions src/julienne/julienne_stop_and_print_m.F90
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
! Copyright (c), The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"

#if HAVE_STOP_AND_PRINT_SUPPORT
#include "julienne-language-support.F90"

module julienne_stop_and_print_m
#if HAVE_STOP_AND_PRINT_SUPPORT
!! Define a pure subroutine that formats and prints various data types during error termination
use julienne_string_m, only : string_t
implicit none
Expand Down Expand Up @@ -66,6 +65,7 @@ pure module function character_stop_code(stuff) result(stop_code)
end function

end interface

end module julienne_stop_and_print_m
#else
EMPTY_MODULE_ANCESTOR
#endif
end module julienne_stop_and_print_m
11 changes: 5 additions & 6 deletions src/julienne/julienne_stop_and_print_s.F90
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
! Copyright (c), The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"

#if HAVE_STOP_AND_PRINT_SUPPORT
#include "julienne-language-support.F90"

submodule(julienne_stop_and_print_m) julienne_stop_and_print_s
#if HAVE_STOP_AND_PRINT_SUPPORT
use julienne_string_m, only : operator(.csv.), operator(.separatedBy.)
use julienne_file_m, only : file_t
use julienne_multi_image_m, only : internal_error_stop
Expand Down Expand Up @@ -187,7 +186,7 @@ pure subroutine stop_and_print_header_data_footer(data, header, footer)
end associate
end select
end procedure

end submodule julienne_stop_and_print_s

#else
EMPTY_MODULE_SUBMODULE
#endif
end submodule julienne_stop_and_print_s
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_description_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "julienne-assert-macros.h"
#include "assert_macros.h"
#include "language-support.F90"
#include "julienne-language-support.F90"

submodule(julienne_test_description_m) julienne_test_description_s
use assert_m
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_diagnosis_m.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

module julienne_test_diagnosis_m
!! Define abstractions, defined operations, and procedures for writing correctness checks
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_diagnosis_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"
#include "assert_macros.h"

submodule(julienne_test_diagnosis_m) julienne_test_diagnosis_s
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_harness_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

submodule(julienne_test_harness_m) julienne_test_harness_s
use iso_fortran_env, only : int64, real64
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_m.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

module julienne_test_m
!! Define an abstract test_t type with deferred bindings ("subject" and "results")
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_result_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! Terms of use are as specified in LICENSE.txt

#include "julienne-assert-macros.h"
#include "language-support.F90"
#include "julienne-language-support.F90"

submodule(julienne_test_result_m) julienne_test_result_s
#if ASSERTIONS
Expand Down
2 changes: 1 addition & 1 deletion src/julienne/julienne_test_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

submodule(julienne_test_m) julienne_test_s
use julienne_test_description_m, only : filter
Expand Down
2 changes: 1 addition & 1 deletion src/julienne_m.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

module julienne_m
!! Global aggregation of all public entities
Expand Down
2 changes: 1 addition & 1 deletion test/driver.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c) 2024-2025, The Regents of the University of California and Sourcery Institute
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "julienne-language-support.F90"

program test_suite_driver
!! Julienne test-suite driver
Expand Down
2 changes: 1 addition & 1 deletion test/idiomatic_assertion_failure_test.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! Terms of use are as specified in LICENSE.txt

#include "julienne-assert-macros.h"
#include "language-support.F90"
#include "julienne-language-support.F90"

program idiomatic_assertion_failure_test
!! Conditionally test an assertion that is hardwired to fail.
Expand Down
Loading
Loading