Trouble debugging EnergyPlus on Linux

asked 2017-10-28 02:26:56 -0500

MAOMAOLEI's avatar

updated 2017-10-30 12:21:15 -0500

I'm trying to debug EnergyPlus on Linux using GDB. I've cloned the code from github, configure/generate in Debug type using cmake, make the Makefile. I open energyplus in gdb and put in.idf/in.epw in the same working directory; then I run energyplus but the program terminates due to following signal. I can't figure out why this happens.

(gdb) file energyplus Reading symbols from energyplus...done. (gdb) run Starting program: /home/adamwwt/xulei/EnergyPlus/cmake-build-debug/Products/energyplus [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/". Program received signal SIGFPE, Arithmetic exception. 0xb64f94f6 in EnergyPlus::DataTimings::epElapsedTime () at /home/adamwwt/xulei/EnergyPlus/src/EnergyPlus/ 585 calctime = clockvalues( 5 ) * 3600.0 + clockvalues( 6 ) * 60.0 + clockvalues( 7 ) + clockvalues( 8 ) / 1000.0; (gdb) print calctime $1 = 4.3447261546838881e-268

I print the calctime value which is unrealistically small since clockvalues are all integer. But I don't know where is the problem.

edit retag flag offensive close merge delete