On Thu, Mar 27, 2014 at 10:25 AM, Seufzer, William J. (LARC-D307)
<[email protected]> wrote:
> Dan,
>
> We're not there yet. I got back to this issue late yesterday and the fix
> doesn't work on my cluster.
>
> I added the code that was recommended at: The workaround:
> https://gist.github.com/wd15/9693712 but it appears now that we hang on the
> line:
>
> mesh = fp.Gmsh3D(mshFile)

Did you try just running that file independently from anything else?

> As with reading the .geo file the cores are busy but after an hour the code
> does not go past the mesh = .... command.

I'm not sure what's going on, but can all the processes read the
mshFile? Check that. It's odd that this works for me across nodes and
not for you.

Also when I run your original problem:

   import fipy as fp
   geoFile = 'tmsh3d.geo'
   mesh = fp.Gmsh3D(geoFile)
   mx,my,mz = mesh.getCellCenters()

I get "IOError: [Errno 2] No such file or directory:
'/tmp/tmpt49sGo.msh'". Did you actually get that error?

> Question: If procID==0 runs gmsh to make the .msh file, why not just run
> gmsh by hand (or script) and have the mesh file ready to go?

Absolutely, just automating it away.

> Is there a way to change FiPy so that the users disk space is used instead
> of /tmp ? Then if one core creates the file all the cores, on various nodes,
> will see it.

Not FiPy, but just tell Python. I didn't think of that first time, but
it is the simplest solution.

   http://docs.python.org/2/library/tempfile.html#tempfile.tempdir

Just set 'tempfile.temdir" to a shared directory at the top of the
script. I believe that will work for all uses of tempfile within the
current Python session.

This works for me across two nodes

    import tempfile
    tempfile.tempdir = './'
    import fipy as fp
    geoFile = 'tmsh3d.geo'
    mesh = fp.Gmsh3D(geoFile)
    mx,my,mz = mesh.getCellCenters()
    print mx

Going forward, it would be nice to automate this. Probably always
reset "tempdir" in parallel just to be safe.

--
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to