Command line interface (CLI) and EPMacro

asked 2018-12-29 11:14:59 -0600

Thierry Nouidui gravatar image

updated 2018-12-31 10:05:11 -0600

I came across another issue with the command line interface of EnergyPlus version 9.0.1. This issue seems to be different from the one reported here

Running the attached file using the CLI on Windows and Linux shows different behavior.

On Windows 10, when I run

energyplus -w D:\EnergyPlusV9-0-1\WeatherData\USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw -p "Test" -s C -x -m -r _fmu-export-schedule_no_ext.idf

EnergyPlus will complete successfully.

On Linux (Ubuntu), when I run (the same command as in Windows)

energyplus -w /usr/local/EnergyPlus-9-0-1/WeatherData/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw -p "Test" -s C -x -m -r _fmu-export-schedule_no_ext.idf

EnergyPlus will crash with following stack trace:

Running EPMacro...
forrtl: No such file or directory
forrtl: severe (29): file not found, unit 1, file /mnt/hgfs/WINDOWS_DATA/proj/lbnl/eplustofmu/EnergyPlusToFMU/Scripts/in.imf
Image              PC                Routine            Line        Source             
EPMacro            000000000047FDFE  Unknown               Unknown  Unknown
EPMacro            000000000047E896  Unknown               Unknown  Unknown
EPMacro            0000000000439A02  Unknown               Unknown  Unknown
EPMacro            000000000040FBAB  Unknown               Unknown  Unknown
EPMacro            000000000040F112  Unknown               Unknown  Unknown
EPMacro            00000000004196F8  Unknown               Unknown  Unknown
EPMacro            000000000040321B  Unknown               Unknown  Unknown
EPMacro            000000000040304C  Unknown               Unknown  Unknown          00007FADAEA27830  Unknown               Unknown  Unknown
EPMacro            0000000000402F49  Unknown               Unknown  Unknown

Any hints?

P.S. The IDF file can be downloaded from C:\fakepath_fmu-export-schedule_no_ext.idf.jpg (After download, please rename the file to _fmu-export-schedule_no_ext.idf).

P.P.S. The path to the Weather file needs to be adjusted to run the command.

This issue affects EnergyPlus models which are exported as FMUs.

edit retag flag offensive close merge delete



For both Windows and Linux, the CLI links the idf path to the current-working-directory/in.imf. From the error message, EPMacro is not finding that file. Is the idf located in the Scripts directory? If not, you may need to use a full path to the idf on the EnergyPlus command line.

MJWitte gravatar imageMJWitte ( 2018-12-31 08:41:45 -0600 )edit

The IDF file is in the Scripts folder. The command works fine on Windows but not on Linux so I don't think that it is a path issue.

Thierry Nouidui gravatar imageThierry Nouidui ( 2018-12-31 09:18:30 -0600 )edit

Not sure what else it could be, the CLI code is the same for Windows and Linux unless you happen to be using Win32 exe. I wonder if EPMacro is assuming an extension of imf. Can you try that?

MJWitte gravatar imageMJWitte ( 2018-12-31 09:55:45 -0600 )edit

But that would be the same on Windows - file extension.

MJWitte gravatar imageMJWitte ( 2018-12-31 09:56:30 -0600 )edit

Yes, I would have expected the same behavior on both systems (I am on a Windows 64 bit machine). Maybe someone with a Linux machine can try and see if he can reproduce.

Thierry Nouidui gravatar imageThierry Nouidui ( 2019-01-01 23:34:24 -0600 )edit