firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
650 stars 618 forks source link

mpi_gnu_linux_64, FDS+Evac with Segmentation fault #7906

Closed gjaeger closed 4 years ago

gjaeger commented 4 years ago

After compiling FDS (current master version) with GNU Fortran and OpenMPI, I get a segmentation fault when executing evac files (like evac_memory_test0.fds).

My result:

$fds_mpi_gnu_linux_64 evac_memory_test0.fds

 Starting FDS ...

 MPI Process      0 started on ias7139

 Reading FDS input file ...

 EVAC: Emesh 1 FF1stFloor has 4 door flow fields
 FDS+Evac pressure method : FFT
 WARNING: Exit LeftExit XB adjusted to mesh FF1stFloor
 Old XB:      0.0000      0.0000      5.2500      6.4500      1.4500      1.5500
 New XB:      0.0000      0.0000      5.2500      6.5000      1.4500      1.5500
 WARNING: Exit RightExit XB adjusted to mesh FF1stFloor
 Old XB:     50.0000     50.0000     25.2500     26.4500      1.4500      1.5500
 New XB:     50.0000     50.0000     25.2500     26.5000      1.4500      1.5500
 WARNING: Exit TopExit XB adjusted to mesh FF1stFloor
 Old XB:      3.2500      4.4500     40.0000     40.0000      1.4500      1.5500
 New XB:      3.2500      4.5000     40.0000     40.0000      1.4500      1.5500

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

Backtrace for this error:
#0  0x7f404a00b70d in ???
#1  0x7f404a00a925 in ???
#2  0x7f4048c1ef1f in ???
#3  0x55d2172d78d4 in ???
#4  0x55d2172e88c8 in ???
#5  0x55d2173b3cfc in ???
#6  0x55d21749fdbe in ???
#7  0x55d216f670ae in ???
#8  0x7f4048c01b96 in ???
#9  0x55d216f670d9 in ???
#10  0xffffffffffffffff in ???
Segmentation fault (core dumped)

The fire simulation (like couch.fds) works.

$ fds_mpi_gnu_linux_64 couch.fds
 Starting FDS ...
 MPI Process      0 started on ias7139
 Reading FDS input file ...
 Fire Dynamics Simulator
 Current Date     : January 17, 2020  10:51:37
 Revision         : FDS6.7.3-364-gf8717c88f-master
 Revision Date    : Thu Jan 16 15:58:20 2020 -0500
 Compiler         : Gnu gfortran 9.2.1-17ubuntu1~18.04.1)
 Compilation Date : Jan 17, 2020  10:44:27
 MPI Enabled;    Number of MPI Processes:       1
 OpenMP Enabled; Number of OpenMP Threads:     16
 MPI version: 3.1
 MPI library version: Open MPI v4.0.2, package: Open MPI artss@ias7139 Distribution, ident: 4.0.2, repo rev: v4.0.2, Oct 07, 2019
 Job TITLE        : Single Couch Test Case
 Job ID string    : couch
 Time Step:      1, Simulation Time:      0.10 s
 Time Step:      2, Simulation Time:      0.20 s
... 

What's my mistake?

rmcdermo commented 4 years ago

I assume this is not the same zone issue?

Try compiling and running the _db (debug) version. It should give us better traceback and a clue for what is going on.

gjaeger commented 4 years ago

I assume this is not the same zone issue?

Yes, it's not the same issue.

gjaeger commented 4 years ago

with debug version:

$ fds_mpi_gnu_linux_64_db evac_memory_test0.fds

 Starting FDS ...

 MPI Process      0 started on ias7139

 Reading FDS input file ...

 EVAC: Emesh 1 FF1stFloor has 4 door flow fields
 FDS+Evac pressure method : FFT
 WARNING: Exit LeftExit XB adjusted to mesh FF1stFloor
 Old XB:      0.0000      0.0000      5.2500      6.4500      1.4500      1.5500
 New XB:      0.0000      0.0000      5.2500      6.5000      1.4500      1.5500
 WARNING: Exit RightExit XB adjusted to mesh FF1stFloor
 Old XB:     50.0000     50.0000     25.2500     26.4500      1.4500      1.5500
 New XB:     50.0000     50.0000     25.2500     26.5000      1.4500      1.5500
 WARNING: Exit TopExit XB adjusted to mesh FF1stFloor
 Old XB:      3.2500      4.4500     40.0000     40.0000      1.4500      1.5500
 New XB:      3.2500      4.5000     40.0000     40.0000      1.4500      1.5500

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

Backtrace for this error:
#0  0x7f5ad1a8770d in ???
#1  0x7f5ad1a86925 in ???
#2  0x7f5ad069af1f in ???
#3  0x55a62769b7ae in determine_fixed_elements
    at ../../Source/hvac.f90:1928
#4  0x55a6276cf538 in __hvac_routines_MOD_proc_hvac
    at ../../Source/hvac.f90:885
#5  0x55a62789b401 in __read_input_MOD_read_data
    at ../../Source/read.f90:119
#6  0x55a627b8e070 in fds
    at ../../Source/main.f90:115
#7  0x55a627c32c80 in main
    at ../../Source/main.f90:5
Segmentation fault (core dumped)
drjfloyd commented 4 years ago

Yep that is a bug. Surprised we haven't had that pop up before. DETERMINE_FIXED_ELEMENTS is called from PROC_HVAC but we aren't checking to see if there are any HVAC elements. The Intel compiler really should throw an error for this as well.

drjfloyd commented 4 years ago

Should be fixed now.

gjaeger commented 4 years ago

Thanks. It works.

$fds_mpi_gnu_linux_64 evac_memory_test0.fds

 Starting FDS ...

 MPI Process      0 started on ias7139

 Reading FDS input file ...

 EVAC: Emesh 1 FF1stFloor has 4 door flow fields
 FDS+Evac pressure method : FFT
 WARNING: Exit LeftExit XB adjusted to mesh FF1stFloor
 Old XB:      0.0000      0.0000      5.2500      6.4500      1.4500      1.5500
 New XB:      0.0000      0.0000      5.2500      6.5000      1.4500      1.5500
 WARNING: Exit RightExit XB adjusted to mesh FF1stFloor
 Old XB:     50.0000     50.0000     25.2500     26.4500      1.4500      1.5500
 New XB:     50.0000     50.0000     25.2500     26.5000      1.4500      1.5500
 WARNING: Exit TopExit XB adjusted to mesh FF1stFloor
 Old XB:      3.2500      4.4500     40.0000     40.0000      1.4500      1.5500
 New XB:      3.2500      4.5000     40.0000     40.0000      1.4500      1.5500

 Fire Dynamics Simulator

 Current Date     : January 17, 2020  16:41:12
 Revision         : FDS6.7.3-364-gf8717c88f-master
 Revision Date    : Thu Jan 16 15:58:20 2020 -0500
 Compiler         : Gnu gfortran 9.2.1-17ubuntu1~18.04.1)
 Compilation Date : Jan 17, 2020  10:44:27

 MPI Enabled;    Number of MPI Processes:       1
 OpenMP Enabled; Number of OpenMP Threads:     16

 MPI version: 3.1
 MPI library version: Open MPI v4.0.2, package: Open MPI artss@ias7139 Distribution, ident: 4.0.2, repo rev: v4.0.2, Oct 07, 2019

 Job TITLE        : test for RAM: fire mesh
 Job ID string    : evac_memory_test0

 Time Step:   -199,    Evacuation Initialization Time:    -1.990 s
 Time Step:   -149,    Evacuation Initialization Time:    -1.490 s
 Time Step:    -99,    Evacuation Initialization Time:    -0.990 s
 Time Step:    -49,    Evacuation Initialization Time:    -0.490 s
 Time Step:      1, Simulation Time:      0.10 s
...
 Time Step:    101, Simulation Time:     10.00 s

STOP: FDS completed successfully (CHID: evac_memory_test0)

We can close the issue.