Skip to content

Commit f1b32b0

Browse files
committed
First step fixing #774.
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.
1 parent 6ea8202 commit f1b32b0

File tree

6 files changed

+659
-17
lines changed

6 files changed

+659
-17
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ endif()
233233
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0.0 ) )
234234
add_definitions(-DGCC_GE_8) # Tell library to build against GFortran 8.x bindings w/ descriptor change
235235
endif()
236+
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 14.0.0 ) )
237+
add_definitions(-DGCC_GE_15) # Tell library to build against GFortran 15.x bindings
238+
endif()
236239

237240
if(gfortran_compiler)
238241
set(OLD_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
@@ -858,6 +861,7 @@ if(opencoarrays_aware_compiler)
858861

859862
# Pure sendget tests
860863
add_caf_test(strided_sendget 3 strided_sendget)
864+
add_caf_test(get_with_1d_vector_index 3 get_with_1d_vector_index)
861865
add_caf_test(get_with_vector_index 4 get_with_vector_index)
862866

863867
# Collective subroutine tests

src/application-binary-interface/libcaf.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
3030

3131
#include <stdbool.h>
3232
#include <stddef.h> /* For size_t. */
33+
#include <stdint.h>
3334

3435
#include "libcaf-gfortran-descriptor.h"
3536
#include "libcaf-version-def.h"
@@ -261,6 +262,23 @@ void PREFIX(caf_sendget)(caf_token_t, size_t, int, gfc_descriptor_t *,
261262
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
262263
int *);
263264

265+
#ifdef GCC_GE_15
266+
void PREFIX(register_accessor)(const int hash,
267+
void (*accessor)(void **, int32_t *, void *,
268+
void *, size_t *, size_t *));
269+
270+
void PREFIX(register_accessors_finish)();
271+
272+
int PREFIX(get_remote_function_index)(const int hash);
273+
274+
void PREFIX(get_by_ct)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
275+
const size_t *opt_src_charlen, const int image_index,
276+
const size_t dst_size, void **dst_data,
277+
size_t *opt_dst_charlen, gfc_descriptor_t *opt_dst_desc,
278+
const bool may_realloc_dst, const int getter_index,
279+
void *get_data, const size_t get_data_size, int *stat,
280+
caf_team_t *team, int *team_number);
281+
#endif
264282
#ifdef GCC_GE_8
265283
void PREFIX(get_by_ref)(caf_token_t, int, gfc_descriptor_t *dst,
266284
caf_reference_t *refs, int dst_kind, int src_kind,

0 commit comments

Comments
 (0)