Skip to content

Commit

Permalink
First step fixing #774.
Browse files Browse the repository at this point in the history
This is the first step of fixing #774. As long as programs only
use get from a remote image they already should work fine with
a most recent gfortran compiler.
  • Loading branch information
vehre committed Dec 20, 2024
1 parent a660c7c commit fa55241
Show file tree
Hide file tree
Showing 6 changed files with 682 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ endif()
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0.0 ) )
add_definitions(-DGCC_GE_8) # Tell library to build against GFortran 8.x bindings w/ descriptor change
endif()
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 14.0.0 ) )
add_definitions(-DGCC_GE_15) # Tell library to build against GFortran 15.x bindings
endif()

if(gfortran_compiler)
set(OLD_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
Expand Down Expand Up @@ -857,6 +860,7 @@ if(opencoarrays_aware_compiler)

# Pure sendget tests
add_caf_test(strided_sendget 3 strided_sendget)
add_caf_test(get_with_1d_vector_index 3 get_with_1d_vector_index)
add_caf_test(get_with_vector_index 4 get_with_vector_index)

# Collective subroutine tests
Expand Down
17 changes: 17 additions & 0 deletions src/application-binary-interface/libcaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,23 @@ void PREFIX(caf_sendget)(caf_token_t, size_t, int, gfc_descriptor_t *,
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
int *);

#ifdef GCC_GE_15
void PREFIX(register_accessor)(const int hash,
void (*accessor)(void **, int32_t *, void *,
void *, size_t *, size_t *));

void PREFIX(register_accessors_finish)();

int PREFIX(get_remote_function_index)(const int hash);

void PREFIX(get_by_ct)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
const size_t *opt_src_charlen, const int image_index,
const size_t dst_size, void **dst_data,
size_t *opt_dst_charlen, gfc_descriptor_t *opt_dst_desc,
const bool may_realloc_dst, const int getter_index,
void *get_data, const size_t get_data_size, int *stat,
caf_team_t *team, int *team_number);
#endif
#ifdef GCC_GE_8
void PREFIX(get_by_ref)(caf_token_t, int, gfc_descriptor_t *dst,
caf_reference_t *refs, int dst_kind, int src_kind,
Expand Down
Loading

0 comments on commit fa55241

Please sign in to comment.