1
1

test: call opal_init/finalize_util in ddt tests

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2018-12-06 10:35:40 -07:00
родитель a39cb747dd
Коммит 46255d0790
5 изменённых файлов: 30 добавлений и 7 удалений

Просмотреть файл

@ -1,8 +1,10 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -14,6 +16,7 @@
#include "opal/datatype/opal_convertor.h"
#include "ompi/datatype/ompi_datatype.h"
#include "opal/datatype/opal_datatype_checksum.h"
#include "opal/runtime/opal.h"
#include <stdio.h>
#include <stdlib.h>
@ -38,6 +41,7 @@ int main( int argc, char* argv[] )
struct iovec iov[2];
opal_convertor_t* convertor;
opal_init_util (NULL, NULL);
ompi_datatype_init();
srandom( (int)time(NULL) );
/*srandomdev();*/
@ -149,6 +153,7 @@ int main( int argc, char* argv[] )
/* clean-ups all data allocations */
ompi_datatype_finalize();
opal_finalize_util ();
return 0;
}

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -13,6 +13,8 @@
* Copyright (c) 2006 Sun Microsystems Inc. All rights reserved.
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -63,6 +65,7 @@ main(int argc, char* argv[])
int _dbg = 0;
while (_dbg) poll(NULL, 0, 1);
opal_init_util (NULL, NULL);
ompi_datatype_init();
/**
@ -397,6 +400,7 @@ main(int argc, char* argv[])
cleanup:
ompi_datatype_finalize();
opal_finalize_util ();
return ret;
}

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
@ -13,6 +13,8 @@
* Copyright (c) 2006 Sun Microsystems Inc. All rights reserved.
* Copyright (c) 2018 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -23,6 +25,8 @@
#include "ompi_config.h"
#include "ddt_lib.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/runtime/opal.h"
#include <time.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TIME_H
@ -148,6 +152,7 @@ int main( int argc, char* argv[] )
ompi_datatype_t *pdt, *pdt1, *pdt2, *pdt3;
int rc, length = 500, iov_num = 5;
opal_init_util (NULL, NULL);
ompi_datatype_init();
/**
@ -310,6 +315,7 @@ int main( int argc, char* argv[] )
/* clean-ups all data allocations */
ompi_datatype_finalize();
opal_finalize_util ();
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,10 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -19,6 +21,7 @@
#include "opal/datatype/opal_convertor.h"
#include "ompi/datatype/ompi_datatype.h"
#include "opal/util/output.h"
#include "opal/runtime/opal.h"
/**
* The purpose of this test is to simulate the multi-network packing and
@ -231,7 +234,7 @@ int main( int argc, char* argv[] )
}
memcpy(recv_buffer, send_buffer, sizeof(ddt_ldi_t) * data_count );
opal_datatype_init();
opal_init_util (NULL, NULL);
ompi_datatype_init();
#if (OPAL_ENABLE_DEBUG == 1) && (OPAL_C_HAVE_VISIBILITY == 0)
@ -278,6 +281,7 @@ int main( int argc, char* argv[] )
free(segments);
ompi_datatype_finalize();
opal_finalize_util ();
return (0 == errors ? 0 : -1);
}

Просмотреть файл

@ -1,10 +1,12 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2017 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -19,6 +21,7 @@
#include "opal/datatype/opal_convertor.h"
#include "ompi/datatype/ompi_datatype.h"
#include "opal/util/output.h"
#include "opal/runtime/opal.h"
/**
* The purpose of this test is to simulate the multi-network packing and
@ -199,7 +202,7 @@ int main( int argc, char* argv[] )
recv_buffer[i] = 0xdeadbeef;
}
opal_datatype_init();
opal_init_util (NULL, NULL);
ompi_datatype_init();
ompi_datatype_create_vector(NELT/2, 1, 2, MPI_INT, &datatype);
@ -245,6 +248,7 @@ int main( int argc, char* argv[] )
free(segments);
ompi_datatype_finalize();
opal_finalize_util ();
return (0 == errors ? 0 : -1);
}