mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Don't allow MPI-parallel GUI
This commit is contained in:
parent
b13a69a39d
commit
c274126487
@ -33,7 +33,7 @@ namespace netgen
|
|||||||
T_POINTS points;
|
T_POINTS points;
|
||||||
|
|
||||||
// The communicator for this mesh. Just a dummy if compiled without MPI.
|
// 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
|
/// line-segments at edges
|
||||||
Array<Segment, 0, size_t> segments;
|
Array<Segment, 0, size_t> segments;
|
||||||
|
@ -13,9 +13,9 @@ Visualization
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef PARALLEL
|
// #ifdef PARALLEL
|
||||||
#define PARALLELGL
|
// #define PARALLELGL
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
#include "../include/incopengl.hpp"
|
#include "../include/incopengl.hpp"
|
||||||
|
|
||||||
|
@ -73,8 +73,12 @@ int main(int argc, char ** argv)
|
|||||||
MPI_Comm_size(MPI_COMM_WORLD, &netgen::ntasks);
|
MPI_Comm_size(MPI_COMM_WORLD, &netgen::ntasks);
|
||||||
MPI_Comm_rank(MPI_COMM_WORLD, &netgen::id);
|
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
|
#endif
|
||||||
|
|
||||||
if ( netgen::id == 0 )
|
if ( netgen::id == 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user