firemodels / cfast

Consolidated Model of Fire and Smoke Transport
Other
68 stars 67 forks source link

CFAST with gnu compiler with optimized options. #2101

Open preneke opened 7 months ago

preneke commented 7 months ago

The following messaged identified an apparent problem with the gnu compiler using the optimized options.

I followed the instructions outlined in the wiki to build cfast from the makefile on windows intel 64 using gnu, which was successful with no errors. I used the latest repository for this build (no changes in the source files were made). I created an input file and ran a simulation (see input file below) in Cedit 7.7.4 with no problems.

Input file:

&HEAD VERSION = 7700, TITLE = 'CFAST Simulation' / !! Scenario Configuration &TIME SIMULATION = 5400 PRINT = 60 SMOKEVIEW = 15 SPREADSHEET = 15 / &INIT PRESSURE = 101325 RELATIVE_HUMIDITY = 50 INTERIOR_TEMPERATURE = 20 EXTERIOR_TEMPERATURE = 20 /

!! Material Properties &MATL ID = 'NM 1' MATERIAL = 'New Material 1', CONDUCTIVITY = 0.033 DENSITY = 160 SPECIFIC_HEAT = 1.03, THICKNESS = 0.075 EMISSIVITY = 0.9 / &MATL ID = 'NM 2' MATERIAL = 'New Material 2', CONDUCTIVITY = 0.1 DENSITY = 500 SPECIFIC_HEAT = 1.76, THICKNESS = 0.016 EMISSIVITY = 0.9 / !! Compartments &COMP ID = 'Comp 1' DEPTH = 1 HEIGHT = 1.3 WIDTH = 1.5 CEILING_MATL_ID = 'NM 2' CEILING_THICKNESS = 0.3 WALL_MATL_ID = 'NM 1' WALL_THICKNESS = 0.3 FLOOR_MATL_ID = 'NM 2' ORIGIN = 0, 0, 0 GRID = 50, 50, 50 / !! Wall Vents &VENT TYPE = 'WALL' ID = '1' COMP_IDS = 'Comp 1' 'OUTSIDE' , BOTTOM = 0 HEIGHT = 1 WIDTH = 0.5 FACE = 'FRONT' OFFSET = 0.5 / !! Fires &FIRE ID = 'fire1' COMP_ID = 'Comp 1', FIRE_ID = 'New Fire 6' LOCATION = 0.25, 0.25 / &CHEM ID = 'New Fire 6' CARBON = 1 CHLORINE = 0 HYDROGEN = 4 NITROGEN = 0 OXYGEN = 0 HEAT_OF_COMBUSTION = 50000 RADIATIVE_FRACTION = 0.35 / &TABL ID = 'New Fire 6' LABELS = 'TIME', 'HRR' , 'HEIGHT' , 'AREA' , 'CO_YIELD' , 'SOOT_YIELD' , 'HCN_YIELD' , 'HCL_YIELD' , 'TRACE_YIELD' / &TABL ID = 'New Fire 6', DATA = 0, 0.1, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 1, 5, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 1200, 20, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 1201, 20, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 1525, 20, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 1526, 5, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 4000, 5, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 4001, 5, 0, 0.09, 0, 0, 0, 0, 0 / &TABL ID = 'New Fire 6', DATA = 5400, 0, 0, 0.09, 0, 0, 0, 0, 0 / &TAIL /

To test if my build works, I copied the .in file into the directory of the build and ran it, I get two types of errors depending on the HRR I specify in the first time step. If I specify zero HRR at time zero I get the following error:

Error, at t (=r1) and stepsize h (=r2) the initial yprime could not be computed ierror,r1,r2 = 685 0.0000D+00 0.0000D+00 Solution component with the greatest error is upper layer temp in room 1 Error, dassl - idid = -12 Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

If I set the HRR at say 0.1 at time = 0 I get the following error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

0 0x9649bbda

https://github.com/firemodels/cfast/issues/1 0x9648dc63 https://github.com/firemodels/cfast/issues/2 0x9646ecf6 https://github.com/firemodels/cfast/issues/3 0xca27b247 https://github.com/firemodels/cfast/issues/4 0xcae7441e https://github.com/firemodels/cfast/issues/5 0xcadee465 https://github.com/firemodels/cfast/issues/6 0xcae7340d https://github.com/firemodels/cfast/issues/7 0x963f3606 https://github.com/firemodels/cfast/issues/8 0x963f4dd6 https://github.com/firemodels/cfast/issues/9 0x9643566b https://github.com/firemodels/cfast/issues/10 0x9640362c https://github.com/firemodels/cfast/issues/11 0x96437ec8 https://github.com/firemodels/cfast/issues/12 0x96462fac https://github.com/firemodels/cfast/issues/13 0x964b9549 https://github.com/firemodels/cfast/issues/14 0x963e13ad https://github.com/firemodels/cfast/issues/15 0x963e14e5 https://github.com/firemodels/cfast/issues/16 0xca10257c https://github.com/firemodels/cfast/issues/17 0xcae2aa57 https://github.com/firemodels/cfast/issues/18 0xffffffff

I have tried specifying MAX_TIME_STEP = 0.01 on the &misc line but to no avail.

Could you please assist me with this? Thank you in advance.

mcgratta commented 5 months ago

Paul -- did you create this issue, or is it someone else's issue that you pasted in?

preneke commented 5 months ago

It was an issue that you helped a user on. Their issue was complete, so I created a new one to address GNU compiler issues.