Does the external mpi that you are using define MPI_COMM_WORLD ? The line you are hitting shuold only be hit if the mpi being used does not define MPI_COMM_WORLD… It is inside a #if block:
#ifndef MPI_COMM_WORLD
#define MPI_COMM_WORLD 0
using MPI_Comm = int;
#endif
[Ignore this comment – I think the issue is that this is a parallel build, but SEACAS_HAVE_MPI is not defined]
It “defines” MPI_COMM_WORLD, but it doesn’t #define MPI_COMM_WORLD. I was under the impression that MPI_COMM_WORLD was required to be in a #define, but obviously that is not the case here…
[Ignore this comment – I think the issue is that this is a parallel build, but SEACAS_HAVE_MPI is not defined]
I need to figure out why I needed this code in the first place since it is right after an include <mpi.h> which should provide what is needed…
I think that maybe SEACAS_HAVE_MPI is not being defined which means that mpi.h is not being included as it should… This should maybe be a better name for this symbol, but needs to be defined if the IOSS library is being compiled using mpi…
So SEACAS_HAVE_MPI is not set correctly (assuming this is a parallel build). In the CMakeLists.txt that creates the SEACASIoss_config.h, the setting is controlled by TPL_ENABLE_MPI which should be defined if you have a parallel build…
Note that what SEACAS thinks is a parallel build may not match with what VTK thinks. Here, we have a non-parallel netcdf (and probably hdf5), so we cannot enable Ioss MPI support. Unfortunately, it seems that MPI is included elsewhere in an Ioss-using TU and the MPI compat stuff gets confused. I think that, instead of trying to define MPI_* types directly, it’d be better to use new type names.
If you are using an mpi compiler, then you are doing a seacas parallel build. If you have a serial netCDF and HDF5, then IOSS will still enable parallel capabilities, but only using file-per-rank type of parallel execution and not parallel-IO (which requires parallel netCDF and HDF5).
I will grant that this mode is not tested / built very often, so there are perhaps issues that have snuck into the build, but it is possible to build IOSS and SEACAS parallel with serial netCDF and HDF5.