0

Compilation mistake

I have been trying to use Tough2 version 2.1 in Windows 7 (64 bit) but it hasn’t worked. I am using the commands

gfortran -c -O2 -fdefault-real-8 -fno-align-commons -fdefault-double-8 -funroll-loops t2fm.f t2cg22n.f EOS3.F t2f.f meshm.f t2solv.f ma28.f T2

gfortran -O2 -fdefault-real-8 -fno-align-commons -fdefault-double-8 -funroll-loops -static -o tough2_3 t2cg22n.o meshm.o EOS3.o t2f.o ma28.o t2solv.o t2fm.o T2

and also I’ve used it without the command -funroll-loops. The .exe is ok, but when I solved the file SAM1 with the MESH and INCON outside the input it shows mistake (program received signal SIGSEV:segmentation fault-invalid memory reference). I mean I haven’t been able to solve problems with a MESH outside the input file. I’m using gfortran with the free compiler MINGW.

I send you the file that I'm using without the MESH and INCON inside.

Any clue??

5 replies

null
    • Senior Geothermal Scientist - Vatnaskil Consulting Engineers
    • Andri_Arnaldsson
    • 8 yrs ago
    • Reported - view

    Try to reduce the optimization from -O2 to -O0.

    • Ana_Avila
    • 8 yrs ago
    • Reported - view

    It didn't work.

    • TOUGHREACT Developer
    • Eric_Sonnenthal
    • 8 yrs ago
    • Reported - view
    Which version of gfortran? Try v6.
    • Finsterle GeoConsulting
    • Stefan_Finsterle
    • 8 yrs ago
    • Reported - view

    Try to compile with -g to see where the seg fault comes from.

    • Roland_Kaufmann
    • 8 yrs ago
    • Reported - view

    Compile as you do, but add -ggdb3 to the list of options (to both compile and link). Then run it like this:

    gdb -q -batch -ex r -ex bt --args tough2_3

    This will launch the program in the debugger, instructing it to run and then to print a back-trace once the program crashes. Hopefully, the source line that performs the memory access will provide some clue to what is wrong.

Content aside

  • 8 yrs agoLast active
  • 5Replies
  • 1003Views
  • 5 Following