MESH-Model / MESH-Dev

This repository contains the official MESH development code, which is the basis for the 'tags' listed under the MESH-Releases repository. The same tags are listed under this repository. Legacy branches and utilities have also been ported from the former SVN (Subversion) repository. Future developments must create 'forks' from this repository.
Other
2 stars 3 forks source link

gfortran #3

Open mee067 opened 1 year ago

mee067 commented 1 year ago

Compiled the 1860 code using gfortran (the default when just using make) successfully but it gives memory errors (for several setups) when run. These same setups run fine when compiled using intel 2018 (make ifort). Is there a particular version of gfortran that need to be used? I compiled using 5.4, 6.4, 7.3, and 9.1 all give the same run-time error: Program received signal SIGSEGV: Segmentation fault - invalid memory reference Ther error occurs right after reading all the configuration files and checking the forcing files before it prints "DONE INTITIALIZATION"

r1813 compiles and runs with gfortran

dprincz commented 1 year ago

Can you compile with symbols to see if it tells you where it happens or point me to example files I can use to replicate?

mee067 commented 1 year ago

I compiled it with gcc 7.3 adding symbols (make symbols). This is the result when I run:


Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x2aaaaacea2fd in ???
#1  0x2aaaaace9543 in ???
#2  0x2aaaab83627f in ???
#3  0x53ceeb in __output_variables_MOD_output_variables_group_update_ts
        at ./Driver/MESH_Driver/output_variables.f90:1389
#4  0x53a3cb in __output_variables_MOD_output_variables_update_ts
        at ./Driver/MESH_Driver/output_variables.f90:2078
#5  0x536ee1 in __output_variables_MOD_output_variables_update
        at ./Driver/MESH_Driver/output_variables.f90:2530
#6  0x822047 in runmesh
        at ./Driver/MESH_Driver/MESH_driver.f90:847
#7  0x826225 in main
        at ./Driver/MESH_Driver/MESH_driver.f90:97
dprincz commented 1 year ago

Any version of gcc >= 5.4 should work fine. The makefile checks the version and stops if it's not compatible. Do these setups use outputs_balance.txt? If so, what fields are active for what time-output frequencies? Second, the identified line points to an 'end if' statement, where I would expect it to point to a line using a variable. Have you made modifications to output_variables.f90?