Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

EnergyPlus FMU error

asked 2017-11-01 23:53:14 -0500

jhuang's avatar

updated 2018-05-21 15:10:52 -0500

Hi all,

I'm trying to generate an EnergyPlus FMU using the user guide.

On the command window I have:

C:\~\~\FMU\Scripts\EnergyPlusToFMU.py -i C:\~\~\EnergyPlusV8-5-0\Energy+.idd -w C:\~\~\WeatherDATA\Tampa.epw C:\~\~\var.idf But I am getting an error that reads:

ERROR from script file (utilManageCompilelLink.pyc) Failed to create object file for source code file {C:\~\~\SourceCode\fmu-export-prep\app-cmdlin-input.cpp}

I made sure that the FMU source codes and compiler and linkage is in the environmental variable path.

Seems like python failed to parse a C++ file.

Could someone tell me what I did wrong? Does this have to do with python accessing C++ libraries.

Thanks

Jan Huang

edit retag flag offensive close merge delete

Comments

Which C/C++ compiler are you using?

Thierry Nouidui's avatar Thierry Nouidui  ( 2017-11-02 13:07:38 -0500 )edit

Thank you for your response. I have Visual Studio 2017 installed.

jhuang's avatar jhuang  ( 2017-11-02 15:58:37 -0500 )edit

Dr. Nouidui, I've uploaded my FMU to simulink(2017b supports FMU import). The variable.cfg file generated after the simulation invokes the PtolemyServer even though I selected FunctionalMockupUnitExport in the original idf file. The exception thrown is:

* Severe * ExternalInterface: Error, xml file "variables.cfg" declares variable "FMUExport:To:Variable:Name", * ~~~ * but variable was not found in idf file.

The FMUExport:From:Variables didn't seem to have this problem. Even correcting the variables.cfg file the right Extenal Interface, the error persists. Thanks.

Jan Huang

jhuang's avatar jhuang  ( 2017-11-12 00:06:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-03 14:48:20 -0500

I suggest using Visual Studio Express 2013 for Windows Desktop with Update 5 which can be downloaded https://my.visualstudio.com/Downloads... granted you have a free account.

I did try to compile the code with version 2017 and ran into the same issue. Things seem to have changed in a non-backwards compatible way...

Don't forget to adjust your batch files to point to the right version of the compiler.

edit flag offensive delete link more

Comments

I am truly grateful for putting the time in helping me resolve this error. The good news is that switch to a different platform resolved the issue as stated above, but unfortunately, due to some other error, an FMU still will not generate. But I have already taken too much of your time and try to resolve this myself(hopefully). Thank you from the bottom of my heart.

Sincerely,

Jan Huang

jhuang's avatar jhuang  ( 2017-11-05 22:16:19 -0500 )edit

I'm not sure if I was supposed to do it, but I got rid of the text on the Energy+.idd file and it worked.

jhuang's avatar jhuang  ( 2017-11-07 14:56:09 -0500 )edit

Dear Jan, I am glad you posted this question. I am having the same issue, although the issue persists even after I switched to MVS 2013. The error message still reads:

\~...~\app-cmdln-input.cpp""=="" was unexpected at this time.
ERROR from script file {utilManageCompileLink.pyc}Failed to create object file for source code file {C:\Users\~...~\app-cmdln-input.cpp}

Could you share how you got rid of the text on the Energy+.idd file? Do you mean that you deleted the comment lines in the file? I'd very much appreciate your input. Thank you!

Regards, Nari

nari's avatar nari  ( 2017-12-07 20:30:58 -0500 )edit

Dear all, I just wanted to share that my problem was due to the space I had in my user folder name on Windows 10. To rename the user folder, I followed instructions from https://support.microsoft.com/en-us/h.... Renaming is a bit of work, but it solved my problem.

nari's avatar nari  ( 2017-12-23 16:00:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

Stats

Asked: 2017-11-01 23:53:14 -0500

Seen: 579 times

Last updated: Nov 03 '17