Skip to content

Commit 46255d0

Browse files
committed
test: call opal_init/finalize_util in ddt tests
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
1 parent a39cb74 commit 46255d0

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

test/datatype/checksum.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
/* -*- Mode: C; c-basic-offset:4 ; -*- */
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2004-2006 The University of Tennessee and The University
44
* of Tennessee Research Foundation. All rights
55
* reserved.
6+
* Copyright (c) 2018 Triad National Security, LLC. All rights
7+
* reserved.
68
* $COPYRIGHT$
79
*
810
* Additional copyrights may follow
@@ -14,6 +16,7 @@
1416
#include "opal/datatype/opal_convertor.h"
1517
#include "ompi/datatype/ompi_datatype.h"
1618
#include "opal/datatype/opal_datatype_checksum.h"
19+
#include "opal/runtime/opal.h"
1720

1821
#include <stdio.h>
1922
#include <stdlib.h>
@@ -38,6 +41,7 @@ int main( int argc, char* argv[] )
3841
struct iovec iov[2];
3942
opal_convertor_t* convertor;
4043

44+
opal_init_util (NULL, NULL);
4145
ompi_datatype_init();
4246
srandom( (int)time(NULL) );
4347
/*srandomdev();*/
@@ -149,6 +153,7 @@ int main( int argc, char* argv[] )
149153

150154
/* clean-ups all data allocations */
151155
ompi_datatype_finalize();
156+
opal_finalize_util ();
152157

153158
return 0;
154159
}

test/datatype/ddt_pack.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* -*- Mode: C; c-basic-offset:4 ; -*- */
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
44
* University Research and Technology
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2006 Sun Microsystems Inc. All rights reserved.
1414
* Copyright (c) 2015-2017 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2018 Triad National Security, LLC. All rights
17+
* reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -63,6 +65,7 @@ main(int argc, char* argv[])
6365
int _dbg = 0;
6466
while (_dbg) poll(NULL, 0, 1);
6567

68+
opal_init_util (NULL, NULL);
6669
ompi_datatype_init();
6770

6871
/**
@@ -397,6 +400,7 @@ main(int argc, char* argv[])
397400

398401
cleanup:
399402
ompi_datatype_finalize();
403+
opal_finalize_util ();
400404

401405
return ret;
402406
}

test/datatype/ddt_raw.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* -*- Mode: C; c-basic-offset:4 ; -*- */
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
44
* University Research and Technology
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2006 Sun Microsystems Inc. All rights reserved.
1414
* Copyright (c) 2018 Los Alamos National Security, LLC. All rights
1515
* reserved.
16+
* Copyright (c) 2018 Triad National Security, LLC. All rights
17+
* reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -23,6 +25,8 @@
2325
#include "ompi_config.h"
2426
#include "ddt_lib.h"
2527
#include "opal/datatype/opal_convertor.h"
28+
#include "opal/runtime/opal.h"
29+
2630
#include <time.h>
2731
#include <stdlib.h>
2832
#ifdef HAVE_SYS_TIME_H
@@ -148,6 +152,7 @@ int main( int argc, char* argv[] )
148152
ompi_datatype_t *pdt, *pdt1, *pdt2, *pdt3;
149153
int rc, length = 500, iov_num = 5;
150154

155+
opal_init_util (NULL, NULL);
151156
ompi_datatype_init();
152157

153158
/**
@@ -310,6 +315,7 @@ int main( int argc, char* argv[] )
310315

311316
/* clean-ups all data allocations */
312317
ompi_datatype_finalize();
318+
opal_finalize_util ();
313319

314320
return OMPI_SUCCESS;
315321
}

test/datatype/position.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
/* -*- Mode: C; c-basic-offset:4 ; -*- */
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2004-2007 The University of Tennessee and The University
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
77
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
8+
* Copyright (c) 2018 Triad National Security, LLC. All rights
9+
* reserved.
810
* $COPYRIGHT$
911
*
1012
* Additional copyrights may follow
@@ -19,6 +21,7 @@
1921
#include "opal/datatype/opal_convertor.h"
2022
#include "ompi/datatype/ompi_datatype.h"
2123
#include "opal/util/output.h"
24+
#include "opal/runtime/opal.h"
2225

2326
/**
2427
* The purpose of this test is to simulate the multi-network packing and
@@ -231,7 +234,7 @@ int main( int argc, char* argv[] )
231234
}
232235
memcpy(recv_buffer, send_buffer, sizeof(ddt_ldi_t) * data_count );
233236

234-
opal_datatype_init();
237+
opal_init_util (NULL, NULL);
235238
ompi_datatype_init();
236239

237240
#if (OPAL_ENABLE_DEBUG == 1) && (OPAL_C_HAVE_VISIBILITY == 0)
@@ -278,6 +281,7 @@ int main( int argc, char* argv[] )
278281
free(segments);
279282

280283
ompi_datatype_finalize();
284+
opal_finalize_util ();
281285

282286
return (0 == errors ? 0 : -1);
283287
}

test/datatype/position_noncontig.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
/* -*- Mode: C; c-basic-offset:4 ; -*- */
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2004-2017 The University of Tennessee and The University
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
77
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
8+
* Copyright (c) 2018 Triad National Security, LLC. All rights
9+
* reserved.
810
* $COPYRIGHT$
911
*
1012
* Additional copyrights may follow
@@ -19,6 +21,7 @@
1921
#include "opal/datatype/opal_convertor.h"
2022
#include "ompi/datatype/ompi_datatype.h"
2123
#include "opal/util/output.h"
24+
#include "opal/runtime/opal.h"
2225

2326
/**
2427
* The purpose of this test is to simulate the multi-network packing and
@@ -199,7 +202,7 @@ int main( int argc, char* argv[] )
199202
recv_buffer[i] = 0xdeadbeef;
200203
}
201204

202-
opal_datatype_init();
205+
opal_init_util (NULL, NULL);
203206
ompi_datatype_init();
204207

205208
ompi_datatype_create_vector(NELT/2, 1, 2, MPI_INT, &datatype);
@@ -245,6 +248,7 @@ int main( int argc, char* argv[] )
245248
free(segments);
246249

247250
ompi_datatype_finalize();
251+
opal_finalize_util ();
248252

249253
return (0 == errors ? 0 : -1);
250254
}

0 commit comments

Comments
 (0)