@@ -114,7 +114,7 @@ int error_called = 0, fake_error_called = 0;
114
114
int * ranks_gc ,* ranks_gf , * failed_images_array ; //to be returned by failed images
115
115
MPI_Errhandler errh ,errh_w ,errh_fake ;
116
116
int completed = 0 ,tmp_lock ;
117
- int * stopped_images ;
117
+ int * stopped_images , n_stopped_imgs ;
118
118
119
119
static int cmpfunc (const void * a , const void * b )
120
120
{
@@ -2860,3 +2860,18 @@ PREFIX (failed_images) (gfc_descriptor_t *array, int team __attribute__ ((unused
2860
2860
array -> dim [0 ]._stride = 1 ;
2861
2861
array -> offset = -1 ;
2862
2862
}
2863
+
2864
+ void
2865
+ PREFIX (stopped_images ) (gfc_descriptor_t * array , int team __attribute__ ((unused )),
2866
+ int kind __attribute__ ((unused )))
2867
+ {
2868
+ int * mem = (int * )calloc (n_stopped_imgs ,sizeof (int ));
2869
+ array -> base_addr = mem ;
2870
+ memcpy (mem ,stopped_images ,n_stopped_imgs * sizeof (int ));
2871
+ qsort (mem ,n_stopped_imgs ,sizeof (int ),cmpfunc );
2872
+ array -> dtype = 265 ;
2873
+ array -> dim [0 ].lower_bound = 1 ;
2874
+ array -> dim [0 ]._ubound = n_stopped_imgs - 1 ;
2875
+ array -> dim [0 ]._stride = 1 ;
2876
+ array -> offset = -1 ;
2877
+ }
0 commit comments