Skip to content

Commit 5e9df52

Browse files
committed
sessions: modify datatype tests cleanup path
With the changes for sessions, OMPI uses a different way of cleaning up allocated resources,namely using a registration of cleanup callbacks that are invoked when opal_finalize_cleanup_domain is called on the list of callbacks. This obviates the need, for example, for a test to explicitly cleanup datatype related resources by invoking ompi_datatype_finalize explicitly. Signed-off-by: Howard Pritchard <[email protected]>
1 parent 1e86fd8 commit 5e9df52

File tree

10 files changed

+5
-10
lines changed

10 files changed

+5
-10
lines changed

ompi/datatype/ompi_datatype.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ OMPI_DECLSPEC extern opal_convertor_t* ompi_mpi_local_convertor;
118118
extern struct opal_pointer_array_t ompi_datatype_f_to_c_table;
119119

120120
OMPI_DECLSPEC int32_t ompi_datatype_init( void );
121-
OMPI_DECLSPEC int32_t ompi_datatype_finalize( void );
122121

123122
OMPI_DECLSPEC int32_t ompi_datatype_default_convertors_init( void );
124123
OMPI_DECLSPEC int32_t ompi_datatype_default_convertors_fini( void );

ompi/datatype/ompi_datatype_module.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343

4444
#include "mpi.h"
4545

46+
static int ompi_datatype_finalize (void);
47+
4648
/**
4749
* This is the number of predefined datatypes. It is different than the MAX_PREDEFINED
4850
* as it include all the optional datatypes (such as MPI_INTEGER?, MPI_REAL?).
@@ -687,7 +689,7 @@ int32_t ompi_datatype_init( void )
687689
}
688690

689691

690-
int ompi_datatype_finalize (void)
692+
static int ompi_datatype_finalize (void)
691693
{
692694
int ret = OMPI_SUCCESS;
693695

test/datatype/checksum.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ int main(int argc, char *argv[])
151151
free(packed);
152152

153153
/* clean-ups all data allocations */
154-
ompi_datatype_finalize();
155154
opal_finalize_util();
156155

157156
return 0;

test/datatype/ddt_pack.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ int main(int argc, char *argv[])
500500
ompi_datatype_destroy(&dup_type);
501501

502502
cleanup:
503-
ompi_datatype_finalize();
504503
opal_finalize_util();
505504

506505
return ret;

test/datatype/ddt_raw.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ int main(int argc, char *argv[])
342342
assert(pdt1 == NULL);
343343

344344
/* clean-ups all data allocations */
345-
ompi_datatype_finalize();
346345
opal_finalize_util();
347346

348347
return OMPI_SUCCESS;

test/datatype/ddt_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ int main(int argc, char *argv[])
579579
assert(pdt2 == NULL);
580580

581581
/* clean-ups all data allocations */
582-
ompi_datatype_finalize();
582+
opal_finalize_util();
583583

584584
return OMPI_SUCCESS;
585585
}

test/datatype/external32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
260260
}
261261
}
262262

263-
ompi_datatype_finalize();
263+
opal_finalize_util();
264264

265265
return 0;
266266
}

test/datatype/partial.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ int main(int argc, char *argv[])
173173
free(packed);
174174

175175
/* clean-ups all data allocations */
176-
ompi_datatype_finalize();
177176
opal_finalize_util();
178177

179178
return 0;

test/datatype/position.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ int main(int argc, char *argv[])
267267
}
268268
free(segments);
269269

270-
ompi_datatype_finalize();
271270
opal_finalize_util();
272271

273272
return (0 == errors ? 0 : -1);

test/datatype/position_noncontig.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ int main(int argc, char *argv[])
235235
}
236236
free(segments);
237237

238-
ompi_datatype_finalize();
239238
opal_finalize_util();
240239

241240
return (0 == errors ? 0 : -1);

0 commit comments

Comments
 (0)