Best Fortran Compiler and OS for iTOUGH2

I just received the files for installing iTOUGH2. I have not used the software before and I am new to working with Fortran. I am currently using a Windows operating system and I am wondering what the best Fortran compiler would be for working with iTOUGH2? I found the following information from the user guide and read_me file:

User Guide:

Compiler options are provided for most Unix platforms and the PC compilers by Lahey¨ and Compaq¨ Visual Fortran (formerly DIGITAL Visual Fortran).

Read me:

The following files must be compiled and linked using a FORTRAN compiler:

=====================================================================================================================
it2main it2input it2xxxx it2sa it2lhs it2user mdeppc eos* zevca zevsreal t2cg22 t2solv t2f meshm thrm csvout it2stubs
     =====================================================================================================================

If using the Compaq Visual Fortran compiler, link mdepcvf
instead of mdeppc (see file mdepcvf.f for additional instructions).
Detailed instructions for compiling iTOUGH2 using the Intel
Fortran compiler can be found on file read_me_INTEL.txt

If using the LAHEY compiler, link mdeplah instead of mdeppc (see files
mdeplah.f and Makefile for additional instructions).

For other compilers, replace machine-dependent functions (such as time
and date) in mdeppc.f.

I read online that Intel Fortran is a descendant of Compaq Visual Fortran (an archaic product). So I am wondering if the Intel Fortran compiler would be best to use with a Windows OS? If not, what are the best existing compilers for working with iTOUGH2 are.

Also, I noticed that most of the instructions for installation are geared towards Linux operating systems and that the documentation indicates Linux OS can handle larger models, so I am also wondering if it would be best to switch to a Linux operating system? If you have any thoughts on this I would greatly appreciate it so that I can ensure that I have the best set up for iTOUGH2.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Zachary,

    You can essentially use any FORTRAN compiler to build iTOUGH2. On PCs, most people seem to use the Intel Fortran Compiler with Visual Studio. You could also install CYGWIN and then use gfortran (if you prefer a Unix-style environment on your PC). On any Unix/Linux platform, compilation of iTOUGH2 is very simple because of the it2make script, but this advantage is only needed if you want to change modules a lot. On Macs and Linux platforms, I use gfortran (which is free) or ifort (which is not).

    Recently I found a compiler that is based on gfortran, but has a bit the look and feel of the Intel Fortran Compiler. Moreover, you can get a multiplatform license (PC/Mac/Linux) for less that $200, and user support is very good. It's called "Simply Fortran", http://simplyfortran.com/. I have it now installed on a very old PC (Windows 7), a Windows 10 machine, a Mac under Catalina, and a Mac with the new M1 processor under Big Sur, which Simply Fortran supports (well: it's gfortran that supports it).

    Yes, on PCs there is a 2 GB memory limitation, but you will (hopefully) never reach it, unless you plan to run really large models with many equations per grid block (e.g., TMVOC or EOS1nT). If you do reach it, you may have to adjust some of the static array sizes (there are only a few; most of the arrays are dynamically allocated). By the way, this 2 GB limitation also applies to the latest MacOS (Big Sur) (which is the reason I keep a Mac running under Catalina).

    As you noticed, iTOUGH2 comes with multiple files named "mdepXXXX.f", which contain machine-dependent subroutines (mainly system calls, such as getting date and time, CPU time, calling an OS command, etc.). You can adjust them, if you want to use a different compiler that does not recognize the rather generic version provided in mdeplinux.f.

    Finally, using different compilers (and compiler options, specifically optimization flags) leads to slightly different iTOUGH2 results and performance.

    It would be nice to hear from others what compilers they use, and whether they have recommendations or any issues (and what they are).

    Good luck!

    Stefan

    Like 1
  • Hi Stefan,

    Thank you for your thorough response! It was very helpful.

    Best,

    Zach

    Like
    • Andri Arnaldsson
    • Senior Geothermal Scientist - Vatnaskil Consulting Engineers
    • Andri_Arnaldsson
    • 9 days ago
    • Reported - view

    I think most people find it very beneficial to run it on Linux/Unix based systems because of all the helpful tools built into the environment, among other things. Of course it will run fine on Windows as well (ignoring the 2GB).

    In general I have found ifort to work better than gfortran on Intel based machines. Not sure about the newest AMD but am curious to find out if anybody has tried it.
     

    Like
Like Follow
  • 9 days agoLast active
  • 3Replies
  • 11Views
  • 3 Following