GithubHelp home page GithubHelp logo

Comments (6)

langevin-usgs avatar langevin-usgs commented on June 26, 2024

@rabbl, there is some non-standard Fortran in MODFLOW-NWT at the moment. You should be able to just fix those issues in the source code, which is what I had to do. I don't remember the details, but I don't think they were difficult to fix.

from pymake.

rabbl avatar rabbl commented on June 26, 2024

@langevin-usgs, sorry, but I'm not very familiar with fortran.
Compiling on debian with pymake comes the following error-message:

gfortran -O2 -fbacktrace -ffpe-summary=overflow -c ./src_temp/gsol7.f -o ./obj_temp/gsol7.o -I./obj_temp -J./mod_temp
./src_temp/gsol7.f:326.25:

        USE, INTRINSIC :: IEEE_ARITHMETIC
                         1
Fatal Error: Can't find an intrinsic module named 'ieee_arithmetic' at (1)
Traceback (most recent call last):
  File "make_mfnwt.py", line 42, in <module>
    make_mfnwt()
  File "make_mfnwt.py", line 32, in make_mfnwt
    expedite=False, dryrun=False, double=False, debug=False)
  File "/usr/local/lib/python2.7/dist-packages/pymake/pymake.py", line 633, in main
    expedite, dryrun, double, debug, fflags)
  File "/usr/local/lib/python2.7/dist-packages/pymake/pymake.py", line 357, in compile_with_gnu
    subprocess.check_call(cmdlist, shell=shellflg)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gfortran', '-O2', '-fbacktrace', '-ffpe-summary=overflow', '-c', './src_temp/gsol7.f', '-o', './obj_temp/gsol7.o', '-I./obj_temp', '-J./mod_temp']' returned non-zero exit status 1

In the sourcecode on ./src_temp/gsol7.f:326.25 there is the following:

C-------CONJUGATE GRADIENT ITERATIVE SOLVER
      SUBROUTINE GSOL_CGAP(NCORESM,NCORESV,
     2                     IPC,ICNVG,ISOLN,NOUTER,NINNER,
     3                     HCLOSE,RCLOSE,ETA,NR,NNZ,DAMP,IA,JA,A,
     4                     NRLU,NNZLU,NJLU,NJW,NWLU,JLU,IU,JW,WLU,Mi,
     5                     X,B,X0,DSCALE1,DSCALE2,
     6                     D,P,Q,Z,T)
        USE, INTRINSIC :: IEEE_ARITHMETIC
        IMPLICIT NONE

What could I change to fix this?
Thanks for helping

from pymake.

mjigmond avatar mjigmond commented on June 26, 2024

@rabbl I'm not sure if it's an option for you, but IEEE_ARITHMETIC was added at GCC version 5 (https://gcc.gnu.org/gcc-5/changes.html). Even so, you'll run into a crash that I fixed by changing a data type in gwf2swr7_NWT.f (that itself will generate some warnings but make will succeed).

14351: DOUBLEPRECISION, INTENT(INOUT) :: T1
change to
14351: REAL, INTENT(INOUT) :: T1

because https://gcc.gnu.org/onlinedocs/gfortran/SECNDS.html.

from pymake.

rabbl avatar rabbl commented on June 26, 2024

Thanks @mjigmond for your suggestions. Debian brings gcc 4.9 with it and I had some problems installing the 5.0 version.
I have solved the issue with compiling and using modflow-owhm for my use case and its compiling and running as expected.

from pymake.

jdhughes-usgs avatar jdhughes-usgs commented on June 26, 2024

The latest release of MODFLOW-NWT (v 1.1.1) available on the web includes changes so that it will compile with gfortran. I have updated the make_mfnwt.py script in the examples directory. I have also added functionality to create a makefile (-mf or --makefile option) with pymake. It works for gfortran on windows or mac (and presumably linux) and for ifort on mac (and presumably linux). It may be a little fragile but I will be doing more testing to clean up some deficiencies.

from pymake.

langevin-usgs avatar langevin-usgs commented on June 26, 2024

The make_mfnwt.py script seems to be working now (at least on my mac), due to the use of all standard Fortran in the latest NWT release. Readme.md has been updated to reflect this.

Still need to add a NWT build to the autotesting, but that is a separate issue.

from pymake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.