Hi,
At line 50 of ompi/mpi/c/topo_test.c, we have:
if (ompi_comm_invalid (comm)) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
FUNC_NAME);
meaning that such an error will always mention MPI_COMM_WORLD in its
error message.
I can be unfortunate if the function was called with MPI_COMM_NULL,
specially considering that one possible error is when test the topology
of a communicator created through MPI_Cart_create or MPI_Graph_create
since these function returns MPI_COMM_NULL for processes that do not
fit in the topology.
On example is if you create a 2X2 grid from a comm_world of size 5: one
of them will be assigned to comm_null.
Would there be a point in improving the message ? if yes I can provide a
patch if you think it's less trouble to check it than to do the fix.
Thanks
Alain
alainm@dhcp1-24:~/codes/mpi$ /opt/openmpi-1.8.2/bin/mpiexec -n 5 ./a.out
--------------------------------------------------------------------------
...blah....
--------------------------------------------------------------------------
This is rank 1 (cart: 1), topology is Cart
This is rank 2 (cart: 2), topology is Cart
This is rank 3 (cart: 3), topology is Cart
This is rank 4, MPI_Cart_create assigned me to null comm!!!
This is rank 0 (cart: 0), topology is Cart
[dhcp1-24:5461] *** An error occurred in MPI_Topo_test
[dhcp1-24:5461] *** reported by process [140103509016577,140101833195524]
[dhcp1-24:5461] *** on communicator MPI_COMM_WORLD <<<== MPI_COMM_NULL
actually.
[dhcp1-24:5461] *** MPI_ERR_COMM: invalid communicator
[dhcp1-24:5461] *** MPI_ERRORS_ARE_FATAL (processes in this communicator
will now abort,
[dhcp1-24:5461] *** and potentially your MPI job)
alainm@dhcp1-24:~/codes/mpi$
--
---
Alain