Don't allow MPI-parallel GUI

This commit is contained in:
Matthias Hochsteger 2019-02-12 15:01:34 +01:00
parent b13a69a39d
commit c274126487
3 changed files with 9 additions and 5 deletions

View File

@ -33,7 +33,7 @@ namespace netgen
T_POINTS points;
// The communicator for this mesh. Just a dummy if compiled without MPI.
NgMPI_Comm comm = MPI_COMM_NULL;
NgMPI_Comm comm;
/// line-segments at edges
Array<Segment, 0, size_t> segments;

View File

@ -13,9 +13,9 @@ Visualization
*/
#ifdef PARALLEL
#define PARALLELGL
#endif
// #ifdef PARALLEL
// #define PARALLELGL
// #endif
#include "../include/incopengl.hpp"

View File

@ -73,8 +73,12 @@ int main(int argc, char ** argv)
MPI_Comm_size(MPI_COMM_WORLD, &netgen::ntasks);
MPI_Comm_rank(MPI_COMM_WORLD, &netgen::id);
if(netgen::ntasks!=1)
throw ngcore::Exception("Netgen GUI cannot run MPI-parallel");
// MPI_COMM_WORLD is just a local communicator
netgen::ng_comm = ngcore::NgMPI_Comm{MPI_COMM_WORLD, false};
MPI_Comm_dup ( MPI_COMM_WORLD, &netgen::mesh_comm);
#endif
if ( netgen::id == 0 )