20void utest_defs(
const char* comp_name){
24 int nbr_vertices[2] = {3, 3};
26 double x_vertices[3] = {-1, 0, 1};
27 double y_vertices[3] = {-1, 0, 1};
31 x_vertices, y_vertices, &point_id );
57 "compB",
"compB",
"field1",
61 "compB",
"compB",
"field2",
67void * utest_put_field_loop(
void* ptr_field_id_){
70 int* ptr_field_id = ptr_field_id_;
71 for(
int i = 0;
i<60; ++
i){
72 printf(
"put: field_id: %d, i: %d\n", *ptr_field_id, i);
81 pthread_t thread1, thread2;
82 pthread_create( &thread1, NULL, &utest_put_field_loop, (
void*) &
field_id1);
83 pthread_create( &thread2, NULL, &utest_put_field_loop, (
void*) &
field_id2);
85 pthread_join( thread1, NULL);
86 pthread_join( thread2, NULL);
89void * utest_get_field_loop(
void* ptr_field_id_){
92 int* ptr_field_id = ptr_field_id_;
93 for(
int i = 0;
i<60; ++
i){
94 printf(
"get: field_id: %d, i: %d\n", *ptr_field_id, i);
96 if(
buffer[5] != *ptr_field_id + i)
104 pthread_t thread1, thread2;
105 pthread_create( &thread1, NULL, &utest_get_field_loop, (
void*) &
field_id1);
106 pthread_create( &thread2, NULL, &utest_get_field_loop, (
void*) &
field_id2);
108 pthread_join( thread1, NULL);
109 pthread_join( thread2, NULL);
114 MPI_Init_thread(NULL, NULL, MPI_THREAD_MULTIPLE, &provided);
116 if(provided < MPI_THREAD_MULTIPLE){
117 printf(
"Skip test due to not compatible MPI (MPI_Query_thread: %d)\n", provided);
124 "2023-01-09T14:20:00",
125 "2023-01-09T14:21:00" );
127 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
void yac_cget_(int const field_id, int const collection_size, double *recv_field, int *info, int *ierr)
void yac_cdef_datetime(const char *start_datetime, const char *end_datetime)
void yac_cfinalize()
Finalises YAC.
int const YAC_LOCATION_CORNER
void yac_cdef_grid_reg2d(const char *grid_name, int nbr_vertices[2], int cyclic[2], double *x_vertices, double *y_vertices, int *grid_id)
void yac_cdef_points_reg2d(int const grid_id, int const *nbr_points, int const located, double const *x_points, double const *y_points, int *point_id)
int const YAC_TIME_UNIT_SECOND
void yac_cdef_calendar(int calendar)
void yac_cput_(int const field_id, int const collection_size, double *send_field, int *info, int *ierr)
int const YAC_PROLEPTIC_GREGORIAN
void yac_cadd_interp_stack_config_nnn(int interp_stack_config_id, int type, size_t n, double max_search_distance, double scale)
void yac_cget_interp_stack_config(int *interp_stack_config_id)
void yac_cdef_comp(char const *comp_name, int *comp_id)
void yac_cdef_field(char const *name, int const comp_id, int const *point_ids, int const num_pointsets, int collection_size, const char *timestep, int time_unit, int *field_id)
void yac_cdef_couple(char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag)
int const YAC_REDUCTION_TIME_NONE