Skip to content

Commit e4431aa

Browse files
committed
Add conditional compile for gcc-15.
1 parent d4ba18c commit e4431aa

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)
@@ -1069,6 +1072,7 @@ communication_thread(void *)
10691072
dprint("ct: Ended.\n");
10701073
return NULL;
10711074
}
1075+
#endif
10721076

10731077
/* Forward declaration of the feature unsupported message for failed images
10741078
* functions. */
@@ -1614,10 +1618,12 @@ PREFIX(init)(int *argc, char ***argv)
16141618
}
16151619
#endif
16161620

1621+
#ifdef GCC_GE_15
16171622
ierr = MPI_Comm_dup(CAF_COMM_WORLD, &ct_COMM);
16181623
chk_err(ierr);
16191624
ierr = pthread_create(&commthread, NULL, &communication_thread, NULL);
16201625
chk_err(ierr);
1626+
#endif
16211627
}
16221628
}
16231629

@@ -1757,6 +1763,7 @@ finalize_internal(int status_code)
17571763
chk_err(ierr);
17581764
#endif // MPI_VERSION
17591765

1766+
#ifdef GCC_GE_15
17601767
dprint("Sending termination signal to communication thread.\n");
17611768
commthread_running = false;
17621769
ierr = MPI_Send(NULL, 0, MPI_BYTE, mpi_this_image, CAF_CT_TAG, ct_COMM);
@@ -1767,6 +1774,7 @@ finalize_internal(int status_code)
17671774
dprint("Freeing ct_COMM.\n");
17681775
MPI_Comm_free(&ct_COMM);
17691776
dprint("Freeed ct_COMM.\n");
1777+
#endif
17701778

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

0 commit comments

Comments
 (0)