Hi, I am having problems outputting fields like Ez, Hx etc. to HDF while running C++ meep in MPI. Here is a simple test program:
////////////////////////////// Test program starts #include <meep.hpp> #include <iostream> using namespace meep; double eps(const vec &p) { return p.x()+p.y(); } int main(int argc, char **argv) { initialize mpi(argc, argv); // do this even for non-MPI Meep double resolution = 20; // pixels per distance volume v = vol2d(5,10, resolution); // 5x10 2d cell structure s(v, eps, pml(1.0)); fields f(&s); double freq = 0.3, fwidth = 0.1; gaussian_src_time src(freq, fwidth); f.add_point_source(Ez, src, vec(1.1, 2.3)); while (f.time() < f.last_source_time()) { f.step(); } f.output_hdf5(Dielectric, v.surroundings()); f.output_hdf5(Ez, v.surroundings()); return 0; } ////////////////////////////// Test program ends While running it normally, without MPI it will output both eps-000150.00.h5 (with the structure) and ez-000150.00.h5 (with the ez component) and it will finish without problems. After that I am able to view the ez-000150.00.h5 or convert it to VTK with h5tovtk. BUT, while running it in MPI mode, with 2 processors for example it stucks always on creation of the ez-000150.00.h5 file. Like if one node was waiting for the other and the program never finishes. What is strange is that outputting the structure works but outputting fields does not. Am I doing something wrong or is it an internal problem with mpi meep ? Thomas Jefferson _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss