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
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,11 @@ jobs:
- name: Build FPM
if: env.FPM_BUILD
run: |
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 -fopenmp -o fpm-temp/fpm fpm-$FPM_VERSION.F90
echo "PATH=${PWD}/fpm-temp:${PATH}" >> "$GITHUB_ENV"
gfortran-14 -fopenmp -o bin/fpm fpm-$FPM_VERSION.F90
echo "PATH=$PWD/bin:${PATH}" >> "$GITHUB_ENV"

##########################################################################
# Set Install Variables
Expand Down
6 changes: 3 additions & 3 deletions docs/README-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Release Procedure for Caffeine
1. Update all instances of the copyright year embedded in: [LICENSE.txt](../LICENSE.txt),
[manifest/fpm.toml.template](../manifest/fpm.toml.template)
2. Update all instances of the release package version number embedded in:
[manifest/fpm.toml.template](../manifest/fpm.toml.template), [install.sh](../install.sh), [version.h](../include/version.h)
[manifest/fpm.toml.template](../manifest/fpm.toml.template), [install.sh](../install.sh), [caffeine-version.h](../include/caffeine-version.h)
3. Update the author list embedded in: [manifest/fpm.toml.template](../manifest/fpm.toml.template)
4. Review top-level [README.md](../README.md) and other user-facing documentation for any
necessary changes
5. Update [docs/implementation-status.md](../docs/implementation-status.md) with current status
6. If the PRIF specification revision is changing, search and update all instances of the old revision,
including `CAF_PRIF_VERSION_{MAJOR,MINOR}` in [version.h](../include/version.h)
including `CAF_PRIF_VERSION_{MAJOR,MINOR}` in [caffeine-version.h](../include/caffeine-version.h)
7. Temporarily hardcode version of gasnet installer in [install.sh](../install.sh) as the
last commit in the release. Set GASNET_VERSION flag to the latest gasnet release
5. Produce the ChangeLog
Expand All @@ -42,7 +42,7 @@ Release Procedure for Caffeine
10. Post release chores
1. Git revert the commit that hardcoded the gasnet version or manually edit
2. Update patch number of the version number embedded in:
[manifest/fpm.toml.template](../manifest/fpm.toml.template), [install.sh](../install.sh), [version.h](../include/version.h)
[manifest/fpm.toml.template](../manifest/fpm.toml.template), [install.sh](../install.sh), [caffeine-version.h](../include/caffeine-version.h)
Update to an odd number to indicate that the `main` branch is currently a snapshot of something
that is beyond the offical release
3. PR a version bump to the Caffeine version in [LFortran third-party CI](https://github.com/lfortran/lfortran/blob/main/ci/test_third_party_codes.sh) and the [LFortran end-to-end tests](https://github.com/lfortran/lfortran/blob/main/ci/test_caffeine.sh)
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,14 @@ else
FFLAGS="$FFLAGS_opt $FFLAGS"
fi

# enable Assert's multi-image support with PRIF callbacks provided by libcaffeine
FFLAGS+=" -DASSERT_MULTI_IMAGE -DASSERT_PARALLEL_CALLBACKS"
# Configure dependencies:
# We utilize Assert's parallel callbacks feature, with PRIF callbacks provided by libcaffeine.
# This feature previously required ASSERT_PARALLEL_CALLBACKS, but is now always enabled.
# We leave Assert's multi-image support disabled (default), because this is
# subsumed by the parallel callbacks, and we don't want native calls to
# this_image() on compilers that might not support it through PRIF.
# We do rename the assert module to reduce the chance of name conflicts:
FFLAGS+=" -Dassert_m=caf_caffiene_assert_m"
# enable Julienne's multi-image support with PRIF callbacks provided by julienne-driver
FFLAGS+=" -DHAVE_MULTI_IMAGE_SUPPORT -DJULIENNE_PARALLEL_CALLBACKS"

Expand Down
4 changes: 2 additions & 2 deletions manifest/fpm.toml.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ maintainer = "fortran@lbl.gov"
copyright = "2021-2026 The Regents of the University of California, through Lawrence Berkeley National Laboratory"

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

[install]
library = true
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/alias_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 "assert_macros.h"
#include "version.h"
#include "caffeine-version.h"

submodule(prif:prif_private_s) alias_s
! DO NOT ADD USE STATEMENTS HERE
Expand Down
4 changes: 2 additions & 2 deletions src/caffeine/allocation_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
! Terms of use are as specified in LICENSE.txt

#include "assert_macros.h"
#include "version.h"
#include "language-support.F90"
#include "caffeine-version.h"
#include "caffeine-language-support.F90"

#ifndef CAF_POISON
#define CAF_POISON ASSERTIONS
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/caffeine.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "../dlmalloc/dl_malloc_caf.h"
#include "../dlmalloc/dl_malloc.h"
#include "caffeine-internal.h"
#include "version.h"
#include "caffeine-version.h"

// Ensure assertion enforcement in this file tracks the Caffeine ASSERTIONS setting
#undef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/co_reduce_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 "assert_macros.h"
#include "language-support.F90"
#include "caffeine-language-support.F90"

submodule(prif:prif_private_s) co_reduce_s
! DO NOT ADD USE STATEMENTS HERE
Expand Down
47 changes: 21 additions & 26 deletions src/caffeine/program_startup_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,29 @@
end if
end procedure

#if ASSERT_PARALLEL_CALLBACKS
subroutine assert_init()
implicit none
assert_this_image => assert_callback_this_image
assert_error_stop => assert_callback_error_stop
end subroutine
pure function assert_callback_this_image() result(this_image_id)
implicit none
integer :: this_image_id

this_image_id = initial_team%this_image
end function

pure subroutine assert_callback_error_stop(stop_code_char)
implicit none
character(len=*), intent(in) :: stop_code_char
subroutine assert_init()
implicit none
assert_this_image => assert_callback_this_image
assert_error_stop => assert_callback_error_stop
end subroutine
pure function assert_callback_this_image() result(this_image_id)
implicit none
integer :: this_image_id

this_image_id = initial_team%this_image
end function

pure subroutine assert_callback_error_stop(stop_code_char)
implicit none
character(len=*), intent(in) :: stop_code_char
# if __LFORTRAN__
! LFortran currently miscompiles the call to caf_fatal_error below
error stop stop_code_char, quiet=.false.
! LFortran currently miscompiles the call to caf_fatal_error below
error stop stop_code_char, quiet=.false.
# else
character(len=:), allocatable, target :: tmp
tmp = stop_code_char
call caf_fatal_error(tmp)
character(len=:), allocatable, target :: tmp
tmp = stop_code_char
call caf_fatal_error(tmp)
# endif
end subroutine
#else
subroutine assert_init()
end subroutine
#endif
end subroutine

end submodule program_startup_s
2 changes: 1 addition & 1 deletion src/caffeine/sync_stmt_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt

#include "version.h"
#include "caffeine-version.h"
#include "assert_macros.h"

submodule(prif:prif_private_s) sync_stmt_s
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/teams_s.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt

#include "version.h"
#include "caffeine-version.h"
#include "assert_macros.h"

submodule(prif:prif_private_s) teams_s
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/unit_test_parameters_m.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Copyright (c), The Regents of the University
! Terms of use are as specified in LICENSE.txt

#include "version.h"
#include "caffeine-version.h"

module unit_test_parameters_m
use, intrinsic :: iso_c_binding, only: c_int, c_funptr, c_null_funptr
Expand Down
4 changes: 2 additions & 2 deletions src/prif.F90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt

#include "language-support.F90"
#include "version.h"
#include "caffeine-language-support.F90"
#include "caffeine-version.h"

module prif

Expand Down
2 changes: 1 addition & 1 deletion test/prif_allocate_test.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "test-utils.F90"
#include "version.h"
#include "caffeine-version.h"

module prif_allocate_test_m
# include "test-uses-alloc.F90"
Expand Down
2 changes: 1 addition & 1 deletion test/prif_teams_test.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "test-utils.F90"
#include "version.h"
#include "caffeine-version.h"

module prif_teams_test_m
# include "test-uses-alloc.F90"
Expand Down
4 changes: 2 additions & 2 deletions test/test-uses-alloc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef CAF_INCLUDED_TEST_USES_ALLOC
#define CAF_INCLUDED_TEST_USES_ALLOC

#include "version.h"
#include "language-support.F90"
#include "caffeine-version.h"
#include "caffeine-language-support.F90"

use prif, only : &
prif_allocate_coarray, &
Expand Down
Loading