- Thank you received: 0
MPI-related grid function loading issue
4 years 2 months ago - 4 years 2 months ago #3167
by philipp
MPI-related grid function loading issue was created by philipp
Dear NGSolve developers,
I recently updated NGSolve to git revision baa43 and found that my older code
for loading a grid function from NGSolve's binary format doesn't work anymore.
Below is a minimal working example (the code files and binary function are attached):
At git revision 6f862 the vtk files show the right function (a phase field with the shape of a u,
somehow I cannot get the corresponding image attached).
At baa43, however, the result is
In non-MPI mode everything is still fine.
I couldn't find a hint in the documentation. Am I using something wrong?
All the best,
Philipp
I recently updated NGSolve to git revision baa43 and found that my older code
for loading a grid function from NGSolve's binary format doesn't work anymore.
Below is a minimal working example (the code files and binary function are attached):
Code:
from ngsolve import *
import netgen.meshing
from netgen.geom2d import unit_square
# setup the mesh
if mpi_world.rank == 0:
ngmesh = Mesh("mesh_subsquare.vol").ngmesh
ngmesh.Distribute(mpi_world)
else:
ngmesh = netgen.meshing.Mesh.Receive(mpi_world)
ngmesh.SetGeometry(unit_square)
mesh = Mesh(ngmesh)
# load function
gf = GridFunction(H1(mesh, order = 4))
gf.Load("ushape_smooth.ngs", parallel = True)
VTKOutput(ma = mesh, coefs = [gf], names = ["ushape"], filename="ushape_" + str(mpi_world.rank)).Do()
At git revision 6f862 the vtk files show the right function (a phase field with the shape of a u,
somehow I cannot get the corresponding image attached).
At baa43, however, the result is
In non-MPI mode everything is still fine.
I couldn't find a hint in the documentation. Am I using something wrong?
All the best,
Philipp
Attachments:
Last edit: 4 years 2 months ago by philipp.
4 years 2 months ago #3170
by joachim
Replied by joachim on topic MPI-related grid function loading issue
works again with the latest nightly ....
Joachim
Joachim
The following user(s) said Thank You: philipp
Time to create page: 0.135 seconds