Skip to content

Commit 33ac09c

Browse files
committed
fixes for spawn multiple - array of info args
and array of errorcodes Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 974106a commit 33ac09c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ class TypeInfoArray(StandardABIType):
15811581
def init_code(self):
15821582
code = [f'int size_{self.tmpname} = {self.count_param};']
15831583
code.append(f'MPI_Info *{self.tmpname} = (MPI_Info *)ompi_abi_malloc(size_{self.tmpname}, sizeof(MPI_Info));')
1584-
code.append(f'if (NULL != {self.tmpname}){{')
1584+
code.append(f'if ((NULL != {self.tmpname}) && (NULL != {self.name}) && (MPI_INFO_NULL_ABI_INTERNAL != {self.name})){{')
15851585
code.append(f'for(int i=0;i<size_{self.tmpname};i++){{')
15861586
code.append(f'{self.tmpname}[i] = {ConvertFuncs.INFO}({self.name}[i]);')
15871587
code.append('}')

ompi/mpi/c/comm_spawn_multiple.c.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
#include "ompi/memchecker.h"
4343

4444
PROTOTYPE ERROR_CLASS comm_spawn_multiple(INT count, STRING_ARRAY array_of_commands, ARGV array_of_argv,
45-
INT_ARRAY array_of_maxprocs, INFO_ARRAY array_of_info:count,
45+
INT_ARRAY array_of_maxprocs:count, INFO_ARRAY array_of_info:count,
4646
ROOT root, COMM comm, COMM_OUT intercomm,
47-
INT_OUT array_of_errcodes)
47+
INT_ARRAY_OUT array_of_errcodes:count)
4848
{
4949
int i=0, rc=0, rank=0, size=0, flag;
5050
ompi_communicator_t *newcomp=MPI_COMM_NULL;

0 commit comments

Comments
 (0)