Skip to content

Commit aa270af

Browse files
committed
Add conditional compile for gcc-15.
1 parent 7b138ff commit aa270af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/runtime-libraries/mpi/mpi_caf.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ char *msgbody;
238238
pthread_mutex_t lock_am;
239239
int done_am = 0;
240240

241+
#ifdef GCC_GE_15
241242
/* Communication thread variables, constants and structures. */
242243
static const int CAF_CT_TAG = 13;
243244
pthread_t commthread;
@@ -325,6 +326,7 @@ struct transfer_msg_data_t
325326
size_t dst_add_data_size;
326327
char data[];
327328
};
329+
#endif
328330

329331
/* Define the descriptor of max rank.
330332
*
@@ -604,6 +606,7 @@ compute_arr_data_size(const gfc_descriptor_t *desc)
604606
return compute_arr_data_size_sz(desc, desc->span);
605607
}
606608

609+
#ifdef GCC_GE_15
607610
size_t
608611
handle_getting(ct_msg_t *msg, int cb_image, void *baseptr, void *dst_ptr,
609612
void **buffer, int32_t *free_buffer, void *dbase)
@@ -1073,6 +1076,7 @@ communication_thread(void *)
10731076
dprint("ct: Ended.\n");
10741077
return NULL;
10751078
}
1079+
#endif
10761080

10771081
/* Forward declaration of the feature unsupported message for failed images
10781082
* functions. */
@@ -1618,10 +1622,12 @@ PREFIX(init)(int *argc, char ***argv)
16181622
}
16191623
#endif
16201624

1625+
#ifdef GCC_GE_15
16211626
ierr = MPI_Comm_dup(CAF_COMM_WORLD, &ct_COMM);
16221627
chk_err(ierr);
16231628
ierr = pthread_create(&commthread, NULL, &communication_thread, NULL);
16241629
chk_err(ierr);
1630+
#endif
16251631
}
16261632
}
16271633

@@ -1761,6 +1767,7 @@ finalize_internal(int status_code)
17611767
chk_err(ierr);
17621768
#endif // MPI_VERSION
17631769

1770+
#ifdef GCC_GE_15
17641771
dprint("Sending termination signal to communication thread.\n");
17651772
commthread_running = false;
17661773
ierr = MPI_Send(NULL, 0, MPI_BYTE, mpi_this_image, CAF_CT_TAG, ct_COMM);
@@ -1771,6 +1778,7 @@ finalize_internal(int status_code)
17711778
dprint("Freeing ct_COMM.\n");
17721779
MPI_Comm_free(&ct_COMM);
17731780
dprint("Freeed ct_COMM.\n");
1781+
#endif
17741782

17751783
/* Free the global dynamic window. */
17761784
ierr = MPI_Win_free(&global_dynamic_win);

0 commit comments

Comments
 (0)