jonghyunharrylee / pyPCGA

pyPCGA: fast and scalable inverse modeling approach
BSD 3-Clause "New" or "Revised" License
23 stars 15 forks source link

problem with mf2005 file on Mac #10

Closed Mahtaw closed 6 years ago

Mahtaw commented 6 years ago

Hi,

I have been trying to run the PCGA modflow example on Mac but have been getting an error. I'm not sure but from what I've seen about similar errors this is because the mf2005 binary is not compatible with my operating system (osx 10.13). Can I get information about which operating systems are compatible with this package?

Here is the traceback that I get.

Traceback (most recent call last):

File "", line 1, in runfile('/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/example_inv_mf.py', wdir='/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy')

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/example_inv_mf.py", line 106, in s_hat, simul_obs, post_diagv, iter_best = prob.Run()

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/pyPCGA-0.1.0-py3.6.egg/pyPCGA/pcga.py", line 1309, in Run s_hat, simul_obs, post_diagv, iter_best = self.GaussNewton()

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/pyPCGA-0.1.0-py3.6.egg/pyPCGA/pcga.py", line 1196, in GaussNewton simul_obs_init = self.ForwardSolve(s_init)

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/pyPCGA-0.1.0-py3.6.egg/pyPCGA/pcga.py", line 375, in ForwardSolve simul_obs = self.forward_model(s,par)

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/example_inv_mf.py", line 81, in forward_model simul_obs = model.run(s, parallelization)

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/mf.py", line 176, in run simul_obs.append(self(item))

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/mf.py", line 184, in call return self.run_model(args[0], args[1])

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/mf.py", line 155, in run_model simul_obs = self.run_model_single(HK, Q_loc, idx)

File "/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/mf.py", line 129, in run_model_single success, buff = mymf.run_model(silent=True)

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/flopy/mbase.py", line 976, in run_model normal_msg=normal_msg)

File "/Users/mahtag2/anaconda3/lib/python3.6/site-packages/flopy/mbase.py", line 1401, in run_model stdout=sp.PIPE, stderr=sp.STDOUT, cwd=model_ws)

File "/Users/mahtag2/anaconda3/lib/python3.6/subprocess.py", line 709, in init restore_signals, start_new_session)

File "/Users/mahtag2/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename)

OSError: [Errno 8] Exec format error: '/Users/mahtag2/Downloads/pyPCGA-master/examples/modflow_flopy/input_files/mf2005'

jonghyunharrylee commented 6 years ago

Hi Mahtaw,

mf2005 executable should be compiled on your Mac. I recommend flopy-pyMake for this.

For more information, please visit my previous class page (http://www2.hawaii.edu/~jonghyun/classes/S18/CEE696/schedule.html) and read "Mac/Linux Users" document in Lecture "MODFLOW (1) - intro and FloPy installation"

Harry

Mahtaw commented 6 years ago

Hi Harry,

thank you so much for your quick response.

Best, Mahta