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

IOError: [Errno 2] No such file or directory: 'staticgf' #41

Open
dequiroga opened this issue May 31, 2019 · 2 comments
Open

IOError: [Errno 2] No such file or directory: 'staticgf' #41

dequiroga opened this issue May 31, 2019 · 2 comments

Comments

@dequiroga
Copy link

I am trying to run the nepal earthquake example, when I compute nepal.fwd.py for forward modelling running the green functions and synthetics, I got the error:

Traceback (most recent call last):
File "nepal.fwd.py", line 66, in
dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax)
File "/home/MudPy/src/python/mudpy/runslip.py", line 170, in make_green
copy('staticgf',green_path+'static/'+model_name+'.static.'+strdepth+'.sub'+subfault)
File "/usr/lib/python2.7/shutil.py", line 133, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 96, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'staticgf'

I have not found any information about this 'staticgf' on the example guide.

@dmelgarm
Copy link
Collaborator

dmelgarm commented Jun 3, 2019

Hi David,

This is because you are running with ncpus=1. Support for only one CPU is being deprecated since almost every single computer has at least 2. As a result some fo the old functions that used to work for serial processing no longer work. This is one of those cases.

The simplest fix is to run with ncpus=2 (or more if you have more CPUs, see here to find how many you have), Make sure you install mpi4py first. Depending on what flavor of python you are using this can be done with conda install mpi4py or pip install mpi4py.

Let me know if this fixes the issue.

@dequiroga
Copy link
Author

Thanks, this fixed the issue.

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