How to use "t2data.run()" in PyTOUGH

I'm very new to TOUGH2 and I started using PyTOUGH.

I tried running a sample code "Horizontal 1D Model" in PyTOUGH's wiki page,

but I got following error message:

--------------------------------------------------------------------------------------------------------

sh: 1: t2eos1: not found
Traceback (most recent call last):
  File "horizontal_1D.py", line 64, in <module>
    lst = t2listing('horiz1D.listing')
  File "/home/tough/.pyenv/versions/3.5.1/lib/python3.5/site-packages/t2listing.py", line 176, in __init__
    raise Exception('Could not detect simulator type.')
Exception: Could not detect simulator type.

----------------------------------------------------------------------------------------------------------

At that time,  I used exectutable file "xt2_eos1" compiled from eos1.f, meshm.f, t2cg22.f, t2f.f and t2solv.f.

And I specified  " t2.data.run(simulator="xt2_eos1") ".

 

Does anyone know how to use method of "t2.data.run()" ??

 

regards
 

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi shohei narita, 

     

    I have come up with the same problem in using itough2 V7.1.0 source code on Ubuntu 16.04. I am a new Linux and Tough learner.

     

    I tried to run the sample code "Horizontal 1D Model" in PyTOUGH's wiki page, one-by-one code line, and it got the following error message:

     

    sh: 1: t2eos1: not found

     

    So I tried to compile the exectutable file "xt2_eos1", by using "gfortran -o xt2_eos1 -g -fdefault-real-8 -falign-commons eos1t2.f t2cg22.f meshm.f t2f.f t2solv.f", but I did not find the exectutable file "xt2_eos1" in the Sourcecode file.

     

    I changed the code line dat.run(simulator = 't2eos1') as dat.run(simulator = 'xt2_eos1'), and still got the same error message:


    sh: 1: xt2_eos1: not found

     

    Can you provide some help?

    Regards.

    Reply Like
  • Please contact the PyTOUGH developers about this issue. It seems PyTOUGH has "hardwired" the name of a TOUGH2 executable it is looking for. But it simply does not make sense to try to run iTOUGH2 through PyTOUGH if PyTOUGH seems to call TOUGH2 instead of iTOUGH2. Recompiling iTOUGH2 (using a list of source code files that are from TOUGH2 rather than iTOUGH2) is definitely the wrong approach. I'm sure there is an easy way to adapt PyTOUGH to accomplish what you want to do.

    Good luck!
    Stefan

    Reply Like
Like Follow
  • 4 wk agoLast active
  • 2Replies
  • 328Views
  • 2 Following