Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: File format ascii not found. #143

Open
Ccaccia73 opened this issue Mar 1, 2019 · 7 comments
Open

ValueError: File format ascii not found. #143

Ccaccia73 opened this issue Mar 1, 2019 · 7 comments

Comments

@Ccaccia73
Copy link

Hi,
I have installed clawpack into an anaconda environment as described here
http://www.clawpack.org/installing.html

Everything seems working, but every example I run gives

~/anaconda2/envs/claw/lib/python2.7/site-packages/clawpack/pyclaw/solution.pyc in get_write_func(self, file_format)
375 % file_format).write
376 except:
--> 377 raise ValueError("File format %s not found." % file_format)
378
379

ValueError: File format ascii not found.

Is it some component that I am missing?
Thank you
Claudio

@ketch
Copy link
Member

ketch commented Mar 1, 2019

Can you tell us exactly which installation method you used and exactly what commands you have executed before getting this error?

@Ccaccia73
Copy link
Author

I first created a new environment with python=2.7 in conda, then I installed claw with the command
conda install -c clawpack -c conda-forge clawpack
afterwards I just installed nose to run the tests and juypter-notebook.
After that I tried to run the example in the ipython interpreter.
Should I set some environment variable?

@ketch
Copy link
Member

ketch commented Mar 2, 2019

PyClaw doesn't require any environment variables to be set.

If you are more specific about how you're running the examples, that may help me help you.

Try running these commands in the same ipython interpreter:

import importlib
importlib.import_module("clawpack.pyclaw.fileio.ascii")

@Ccaccia73
Copy link
Author

I'm sorry, I should have done it before.
importlib is correctly imported. The problem is in the next line which returns a ValueError

ValueError: mpi4py.MPI.Status has the wrong size, try recompiling. Expected 48, got 40

So the problem is related to MPI. I'll try to investigate further

@ketch
Copy link
Member

ketch commented Mar 4, 2019

I think this means that you have more than one MPI installed on your system and they have gotten mixed up (mpi4py is compiled against one but using the other at run-time, or something like that).

I'm a little surprised that mpi4py is getting imported at all here; as a quick hack you could try just uninstalling mpi4py from that conda environment since it's not required unless you want to run in parallel.

@Ccaccia73
Copy link
Author

It looks like clawpack depends on it. If I try to uninstall it I got:
The following packages will be REMOVED:
clawpack-5.5.0-py27h481b005_0
h5py-parallel-2.7.0-py27_25
mpi4py-3.0.0-py27hd955b32_1005

@ketch
Copy link
Member

ketch commented Mar 4, 2019

Ah, the conda install does depend on it because we set it up to just include all the optional dependencies.

Another option would be to install Clawpack using pip rather than Anaconda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants