104
104
* Objects of this data structure are owned by the library and are treated as a
105
105
* black box by the compiler. In the coarray-program the tokens are opaque
106
106
* pointers, i.e. black boxes.
107
- *
107
+ *
108
108
* For each coarray (allocatable|save|pointer) (scalar|array|event|lock) a
109
109
* token needs to be present. */
110
110
typedef struct mpi_caf_token_t
@@ -129,20 +129,20 @@ typedef struct mpi_caf_token_t
129
129
* component has the allocatable or pointer attribute. The token is reduced in
130
130
* size, because the other data is already accessible and has been read from
131
131
* the remote to fullfill the request.
132
- *
132
+ *
133
133
* TYPE t
134
134
* +------------------+
135
135
* | comp * |
136
136
* | comp_token * |
137
137
* +------------------+
138
- *
138
+ *
139
139
* TYPE(t) : o struct T // the mpi_caf_token to t
140
140
* +----------------+
141
141
* | ... |
142
142
* +----------------+
143
- *
143
+ *
144
144
* o[2]%.comp // using T to get o of [2]
145
- *
145
+ *
146
146
* +-o-on-image-2----+ "copy" of the requierd parts of o[2] on current image
147
147
* | 0x4711 | comp * in global_dynamic_window
148
148
* | 0x2424 | comp_token * of type slave_token
@@ -415,7 +415,7 @@ static void
415
415
caf_runtime_error (const char * message , ...)
416
416
{
417
417
va_list ap ;
418
- fprintf (stderr , "Fortran runtime error on image %d: " , caf_this_image );
418
+ fprintf (stderr , "OpenCoarrays internal error on image %d: " , caf_this_image );
419
419
va_start (ap , message );
420
420
vfprintf (stderr , message , ap );
421
421
va_end (ap );
@@ -1210,7 +1210,7 @@ PREFIX(register) (size_t size, caf_register_t type, caf_token_t *token,
1210
1210
mem = malloc (actual_size );
1211
1211
slave_token -> memptr = mem ;
1212
1212
ierr = MPI_Win_attach (global_dynamic_win , mem , actual_size );
1213
- chk_err (ierr );
1213
+ chk_err (ierr );
1214
1214
#ifdef EXTRA_DEBUG_OUTPUT
1215
1215
ierr = MPI_Get_address (mem , & mpi_address ); chk_err (ierr );
1216
1216
#endif
@@ -1941,7 +1941,7 @@ copy_char_to_self(void *src, int src_type, int src_size, int src_kind,
1941
1941
caf_runtime_error ("internal error: copy_char_to_self() "
1942
1942
"for non-char types called." );
1943
1943
#endif
1944
- const size_t
1944
+ const size_t
1945
1945
dst_len = dst_size / dst_kind ,
1946
1946
src_len = src_size / src_kind ;
1947
1947
const size_t min_len = (src_len < dst_len ) ? src_len : dst_len ;
@@ -2022,13 +2022,13 @@ copy_to_self(gfc_descriptor_t *src, int src_kind,
2022
2022
? GFC_DESCRIPTOR_SIZE (src ) : 0 , size , stat );
2023
2023
}
2024
2024
2025
- /* token: The token of the array to be written to.
2025
+ /* token: The token of the array to be written to.
2026
2026
* offset: Difference between the coarray base address and the actual data,
2027
- * used for caf(3)[2] = 8 or caf[4]%a(4)%b = 7.
2027
+ * used for caf(3)[2] = 8 or caf[4]%a(4)%b = 7.
2028
2028
* image_index: Index of the coarray (typically remote,
2029
- * though it can also be on this_image).
2030
- * data: Pointer to the to-be-transferred data.
2031
- * size: The number of bytes to be transferred.
2029
+ * though it can also be on this_image).
2030
+ * data: Pointer to the to-be-transferred data.
2031
+ * size: The number of bytes to be transferred.
2032
2032
* asynchronous: Return before the data transfer has been complete */
2033
2033
2034
2034
void selectType (int size , MPI_Datatype * dt )
@@ -4019,7 +4019,7 @@ do \
4019
4019
(sizeof(gfc_descriptor_t) + (rank) * sizeof(descriptor_dimension))
4020
4020
4021
4021
/* Define the descriptor of max rank.
4022
- *
4022
+ *
4023
4023
* This typedef is made to allow storing a copy of a remote descriptor on the
4024
4024
* stack without having to care about the rank. */
4025
4025
typedef struct gfc_max_dim_descriptor_t
@@ -4329,7 +4329,7 @@ case kind: \
4329
4329
ref -> u .a .dim [src_dim ].s .stride ,
4330
4330
ref -> u .a .dim [src_dim ].s .start ,
4331
4331
ref -> u .a .dim [src_dim ].s .end );
4332
- array_offset_src =
4332
+ array_offset_src =
4333
4333
(ref -> u .a .dim [src_dim ].s .start - src -> dim [src_dim ].lower_bound )
4334
4334
* src -> dim [src_dim ]._stride ;
4335
4335
stride_src =
@@ -4588,7 +4588,7 @@ PREFIX(get_by_ref) (caf_token_t token, int image_index,
4588
4588
bool realloc_required , extent_mismatch = false;
4589
4589
/* Set when the first non-scalar array reference is encountered. */
4590
4590
bool in_array_ref = false, array_extent_fixed = false;
4591
- /* Set when remote data is to be accessed through the
4591
+ /* Set when remote data is to be accessed through the
4592
4592
* global dynamic window. */
4593
4593
bool access_data_through_global_win = false;
4594
4594
/* Set when the remote descriptor is to accessed through the global window. */
@@ -4752,7 +4752,7 @@ case kind: \
4752
4752
riter -> u .a .dim [i ].s .stride ,
4753
4753
riter -> u .a .dim [i ].s .start ,
4754
4754
riter -> u .a .dim [i ].s .end );
4755
- remote_memptr +=
4755
+ remote_memptr +=
4756
4756
(riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
4757
4757
* src -> dim [i ]._stride * riter -> item_size ;
4758
4758
break ;
@@ -5532,7 +5532,7 @@ case kind: \
5532
5532
send_for_ref (ref , i , src_index , mpi_token , dst , src , ds , sr ,
5533
5533
dst_byte_offset + array_offset_dst * ref -> item_size ,
5534
5534
desc_byte_offset + array_offset_dst * ref -> item_size ,
5535
- dst_kind , src_kind , next_dst_dim , src_dim + 1 ,
5535
+ dst_kind , src_kind , next_dst_dim , src_dim + 1 ,
5536
5536
1 , stat , global_dynamic_win_rank , memptr_win_rank ,
5537
5537
ds_global , desc_global
5538
5538
#ifdef GCC_GE_8
@@ -5878,7 +5878,7 @@ PREFIX(send_by_ref) (caf_token_t token, int image_index,
5878
5878
* which is taken care of in the else part. */
5879
5879
if (access_data_through_global_win )
5880
5880
{
5881
- for (ref_rank = 0 ;
5881
+ for (ref_rank = 0 ;
5882
5882
riter -> u .a .mode [ref_rank ] != CAF_ARR_REF_NONE ; ++ ref_rank ) ;
5883
5883
/* Get the remote descriptor and use the stack to store it
5884
5884
* Note, dst may be pointing to mpi_token->desc therefore it
@@ -6271,7 +6271,7 @@ PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
6271
6271
/* Set when the first non-scalar array reference is encountered. */
6272
6272
bool in_array_ref = false;
6273
6273
bool array_extent_fixed = false;
6274
- /* Set when remote data is to be accessed through the
6274
+ /* Set when remote data is to be accessed through the
6275
6275
* global dynamic window. */
6276
6276
bool access_data_through_global_win = false;
6277
6277
/* Set when the remote descriptor is to accessed through the global window. */
@@ -6447,7 +6447,7 @@ case kind: \
6447
6447
riter -> u .a .dim [i ].s .stride ,
6448
6448
riter -> u .a .dim [i ].s .start ,
6449
6449
riter -> u .a .dim [i ].s .end );
6450
- remote_memptr +=
6450
+ remote_memptr +=
6451
6451
(riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
6452
6452
* src -> dim [i ]._stride * riter -> item_size ;
6453
6453
break ;
@@ -6695,7 +6695,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
6695
6695
break ;
6696
6696
case CAF_REF_ARRAY :
6697
6697
{
6698
- const gfc_descriptor_t * src =
6698
+ const gfc_descriptor_t * src =
6699
6699
(gfc_descriptor_t * )(mpi_token -> memptr + local_offset );
6700
6700
for (i = 0 ; riter -> u .a .mode [i ] != CAF_ARR_REF_NONE ; ++ i )
6701
6701
{
@@ -6855,7 +6855,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
6855
6855
switch (array_ref )
6856
6856
{
6857
6857
case CAF_ARR_REF_FULL :
6858
- /* The local_offset stays unchanged when ref'ing the first
6858
+ /* The local_offset stays unchanged when ref'ing the first
6859
6859
* element in a dimension. */
6860
6860
break ;
6861
6861
case CAF_ARR_REF_SINGLE :
@@ -7174,11 +7174,11 @@ GEN_REDUCTION(do_max_int1, int8_t,
7174
7174
#endif
7175
7175
7176
7176
/*
7177
- #ifndef MPI_INTEGER2
7178
- GEN_REDUCTION(do_sum_int1, int16_t, inoutvec[i] += invec[i])
7177
+ #ifndef MPI_INTEGER2
7178
+ GEN_REDUCTION(do_sum_int1, int16_t, inoutvec[i] += invec[i])
7179
7179
GEN_REDUCTION(do_min_int1, int16_t,
7180
- inoutvec[i] = (invec[i] >= inoutvec[i] ? inoutvec[i] : invec[i]))
7181
- GEN_REDUCTION(do_max_int1, int16_t,
7180
+ inoutvec[i] = (invec[i] >= inoutvec[i] ? inoutvec[i] : invec[i]))
7181
+ GEN_REDUCTION(do_max_int1, int16_t,
7182
7182
inoutvec[i] = (invec[i] <= inoutvec[i] ? inoutvec[i] : invec[i]))
7183
7183
#endif
7184
7184
*/
@@ -7685,7 +7685,7 @@ PREFIX(atomic_ref) (caf_token_t token, size_t offset,
7685
7685
{
7686
7686
MPI_Win * p = TOKEN (token );
7687
7687
MPI_Datatype dt ;
7688
- int ierr = 0 ,
7688
+ int ierr = 0 ,
7689
7689
image = (image_index != 0 ) ? image_index - 1 : caf_this_image - 1 ;
7690
7690
7691
7691
selectType (kind , & dt );
@@ -7809,7 +7809,7 @@ PREFIX(event_post) (caf_token_t token, size_t index, int image_index,
7809
7809
7810
7810
#if MPI_VERSION >= 3
7811
7811
CAF_Win_lock (MPI_LOCK_EXCLUSIVE , image , * p );
7812
- ierr = MPI_Accumulate (& value , 1 , MPI_INT , image , index * sizeof (int ), 1 ,
7812
+ ierr = MPI_Accumulate (& value , 1 , MPI_INT , image , index * sizeof (int ), 1 ,
7813
7813
MPI_INT , MPI_SUM , * p ); chk_err (ierr );
7814
7814
CAF_Win_unlock (image , * p );
7815
7815
#else // MPI_VERSION
@@ -8273,19 +8273,19 @@ void PREFIX(change_team) (caf_team_t *team,
8273
8273
tmp_used = (caf_used_teams_list * )calloc (1 ,sizeof (caf_used_teams_list ));
8274
8274
tmp_used -> prev = used_teams ;
8275
8275
8276
- /* We need to look in the teams_list and find the appropriate element.
8277
- * This is not efficient but can be easily fixed in the future.
8278
- * Instead of keeping track of the communicator in the compiler
8279
- * we should keep track of the caf_teams_list element associated with it. */
8276
+ /* We need to look in the teams_list and find the appropriate element.
8277
+ * This is not efficient but can be easily fixed in the future.
8278
+ * Instead of keeping track of the communicator in the compiler
8279
+ * we should keep track of the caf_teams_list element associated with it. */
8280
8280
8281
8281
/*
8282
- tmp_list = teams_list;
8282
+ tmp_list = teams_list;
8283
8283
8284
- while (tmp_list)
8285
- {
8286
- if (tmp_list->team == tmp_team)
8287
- break;
8288
- tmp_list = tmp_list->prev;
8284
+ while (tmp_list)
8285
+ {
8286
+ if (tmp_list->team == tmp_team)
8287
+ break;
8288
+ tmp_list = tmp_list->prev;
8289
8289
}
8290
8290
*/
8291
8291
0 commit comments