UO-Geophysics / MudPy

Kinematic and static rupture forward modeling and inversion code
Other
116 stars 63 forks source link

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

Open dequiroga opened 5 years ago

dequiroga commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Thanks, this fixed the issue.