Skip to content

Commit

Permalink
sessions: make ompi_datatype_finalize global
Browse files Browse the repository at this point in the history
to get make check to compile, and other fixes
to handle the fact that some ompi the make check
tests for datatypes now initialize less of ompi
than before.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
  • Loading branch information
hppritcha committed Jun 23, 2021
1 parent af6f7dd commit 1c1921f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions ompi/datatype/ompi_datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ OMPI_DECLSPEC extern opal_convertor_t* ompi_mpi_local_convertor;
extern struct opal_pointer_array_t ompi_datatype_f_to_c_table;

OMPI_DECLSPEC int32_t ompi_datatype_init( void );
OMPI_DECLSPEC int32_t ompi_datatype_finalize( void );

OMPI_DECLSPEC int32_t ompi_datatype_default_convertors_init( void );
OMPI_DECLSPEC int32_t ompi_datatype_default_convertors_fini( void );
Expand Down
8 changes: 6 additions & 2 deletions ompi/datatype/ompi_datatype_external32.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ int32_t ompi_datatype_default_convertors_init( void )

int32_t ompi_datatype_default_convertors_fini( void )
{
OBJ_RELEASE( ompi_mpi_external32_convertor );
OBJ_RELEASE( ompi_mpi_local_convertor );
if (NULL != ompi_mpi_external32_convertor) {
OBJ_RELEASE( ompi_mpi_external32_convertor );
}
if (NULL != ompi_mpi_local_convertor) {
OBJ_RELEASE( ompi_mpi_local_convertor );
}

return OMPI_SUCCESS;
}
4 changes: 1 addition & 3 deletions ompi/datatype/ompi_datatype_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

#include "mpi.h"

static int ompi_datatype_finalize (void);

/**
* This is the number of predefined datatypes. It is different than the MAX_PREDEFINED
* as it include all the optional datatypes (such as MPI_INTEGER?, MPI_REAL?).
Expand Down Expand Up @@ -689,7 +687,7 @@ int32_t ompi_datatype_init( void )
}


static int ompi_datatype_finalize (void)
int ompi_datatype_finalize (void)
{
int ret = OMPI_SUCCESS;

Expand Down

0 comments on commit 1c1921f

Please sign in to comment.