Thanks Dan,

I ran the example codes that you provided and still have the issue. I'm running the writer code on a cluster with PBS (that is, I can't just invoke MPI  from the command line) to create the 'dump.gz' file with 16 cores. I then copy the file to the desktop and when I try to open it I get:

therm: python fipyreaddump.py 
Traceback (most recent call last):
  File "fipyreaddump.py", line 4, in <module>
    v = fp.tools.dump.read('data.dump')
  File "/Users/wseufzer/anaconda/lib/python2.7/site-packages/FiPy-3.1-py2.7.egg/fipy/tools/dump.py", line 151, in read
    return unpickler.load()
  File "/Users/wseufzer/anaconda/lib/python2.7/site-packages/FiPy-3.1-py2.7.egg/fipy/tools/comms/mpi4pyCommWrapper.py", line 55, in __setstate__
    from PyTrilinos import Epetra
ImportError: No module named PyTrilinos

It appears that in pickling/dumping the cell variable information is stored regarding PyTrilinos. 

I am successful if I set environment variable FIPY_SOLVERS to 'scipy' on the cluster, run the code with one core, and then bring that file to the desktop machine. I'm enclosing an example file with nx=100 and ny=10, written on the cluster.

Attachment: data.dump
Description: Binary data


Cheers,

Bill

On Aug 5, 2014, at 3:29 PM, Daniel Wheeler <[email protected]> wrote:

Hi Bill,

I tried to to this using conda environments and didn't have a problem. I ran
   
    import fipy as fp

    m = fp.Grid2D(nx=10, ny=10)
    v = fp.CellVariable(mesh=m, value=m.x * m.y)

   fp.dump.write(v, 'dump.gz')

in a coda environment with PyTrilinos installled using "mpirun -np 2 python bill.py" and then I changed to an environment without Trilinos installed

    $ source activate notril
    $ python -c "from PyTrilinos import
    ImportError: No module named PyTrilinos

I then ran

    import fipy as fp
    v = fp.tools.dump.read('data.gz')
   print v

with "python bill1.py" and it worked fine.

I did this with the "develop" branch, but I doubt it matters. Does the above work for you? Can you dump the file in an environment with PyTrilinos and then read it in in an environment without PyTrilinos?

Cheers,

Daniel


On Fri, Aug 1, 2014 at 11:56 AM, Seufzer, William J. (LARC-D307) <[email protected]> wrote:
FiPy,

I would like to be able to dump (fipy.tools.dump) data while running on a cluster and later visualize data from the dump files on my laptop.

The dump.write goes well on the cluster but when I try to dump.read on my laptop I get:


  File "/Users/wseufzer/anaconda/lib/python2.7/site-packages/FiPy-3.1-py2.7.egg/fipy/tools/comms/mpi4pyCommWrapper.py", line 55, in __setstate__
    from PyTrilinos import Epetra

ImportError: No module named PyTrilinos

I would rather not have to build Trilinos on my laptop. So yes, I do have PyTrilinos installed on the cluster with FiPy.

I made attempts with using communicator = None, and to use the SerialCommWrapper. But I may not have used the correct syntax, I got various errors.

Thanks,

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




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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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