diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index cc39a46931..98eb18a1a6 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -139,8 +139,15 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } #endif - /* Initialize OMPI procs */ + /* initialize datatypes. This step should be done early as it will create the local convertor + * and local arch used in the proc init. + */ + if (OMPI_SUCCESS != (ret = ompi_ddt_init())) { + error = "ompi_ddt_init() failed"; + goto error; + } + /* Initialize OMPI procs */ if (OMPI_SUCCESS != (ret = ompi_proc_init())) { error = "mca_proc_init() failed"; goto error; @@ -259,12 +266,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } - /* initialize datatypes */ - if (OMPI_SUCCESS != (ret = ompi_ddt_init())) { - error = "ompi_ddt_init() failed"; - goto error; - } - /* initialize ops */ if (OMPI_SUCCESS != (ret = ompi_op_init())) { error = "ompi_op_init() failed";