TOUGHREACT compilation using gfortran MinGW-error message
Dear Community,
I would like to compile TOUGHREACT (version: TR-OMP_Source_v3.3.2-OMP) using gfortran with MinGW.
I typed make eos1 -f makefile_gf, and had the attached error message.
Would it be possible for me to have your help to resolve this issue?
Thanks,
Kyung Jae Lee
8 replies
-
By the way, in the chempar_v3.inc, it's currently written as follows.
parameter (mpri=45,maqx=225,mmin=60,mgas=10,mexc=15,mads=45,
+ MXsites = 4, msurf=5, mpads=10, ntmp=20,
+ mechm=5, !number of mineral kinetic rate mechanisms
+ mechsp=14, !number of species in product term for mineral kinetics
+ mrx=40, !number of aqueous kinetic reactions
+ mechaq=14, !number of aqueous kinetic mechanisms
+ maqsp=20, !number of species in aqueous kinetic rate eq.
+ nc=mpri,ng=mgas,nmgas=mgas,
+ mtot=mpri+maqx+mexc+mads,
+ mnr=mpri+mmin+mgas+msurf+2,
+ maqt=mpri+maqx) -
Update: I resolved this problem by revising the parameters in the chempar_v3.inc as follows.
parameter (mpri=20,maqx=70,mmin=32,mgas=5,mexc=5,mads=45,
+ MXsites = 4, msurf=5, mpads=10, ntmp=20,However, I have a new error now as attached.
I will keep trying to figure this out, but I would appreciate your help if you know how to resolve it.
-
Hi Kyung Jae,
The default memory requirement for distributed TR-OMP_Source_v3.3.2-OMP package seems a little bit too aggressive. For successful compilation, you may need to reduce the memory requirement size. The most effective way is to reduce parameter PARAMETER (MNEL = 999999) and MNCON = 3000000 to smaller ones (which is given in the file flowpar_v3.inc) , for example MNEL=30000, MNCON=100000. You may compile the codes in the cygwin and should not have problem.
For best way to run toughreact on Windows, I would suggest you compile the codes in the Microsoft Visual Studio. You can do it in following way:
(1) Install Visual studio (2017 or later version).
(2) Install oneAPI HPC Toolkit (you got free Intel Fortran Compiler from this platform!)
(3) Run Visual studio and create a new Intel Fortran Console Application Project (select it from the dialogue menu)
(4) Add all the TR-OMP_Source_v3.3.2-OMP package Fortran source codes (*.f) to the project as source files (only one module source file allow a time, you can only add one of the eco2n_v3.f, eos1_v3.f, eos2_v3.f .......); add all the .inc files to the project as Head files. (don't forget to edit the flowpar_v3.inc to reduce MNEL and MNCON)
(5) From the Project property menu select: Project->Property->Fortran->Language->Process OpenMP Directives, turn on OPENMP option (/Qopenmp)
(6) The compilation target and the Project property must be consistent. if you compile the codes for "Release" "X64", the properties change should also did for "Release" "X64" at step 5.
(6) build the project, you should get the executable,. TOUGHREACT with Intel Fortran may have better performance than the one compiled with gfortran.
If you have further problem, please let me know. Good luck.