Error when calling EnergyPlusToFMU from Python on Linux

38 views
Skip to first unread message

Esther Borkowski

unread,
Jun 19, 2020, 9:53:26 AM6/19/20
to energyplus-fmu
Dear community, 

I want to call EnergyPlusToFMU from a Python script on a research computing platform based on Linux. When I run the Python script through a job script, EnergyPlusToFMU does not create FMUs, and I get the following errors:

Reading input and weather file for EnergyPlusToFMU program.

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c: In function ‘matelab_fmiFreeSlaveInstance’:

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:1502:3: warning: implicit declaration of function ‘waitpid’ [-Wimplicit-function-declaration]

 1502 |   waitpid (_c->pid, &status, 0);

      |   ^~~~~~~

In file included from /usr/include/string.h:633,

                 from /lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:29:

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c: In function ‘findNameFile’:

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:176:4: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  176 |    strncpy(in_file, name, strlen(name));

      |    ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:176:4: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c: In function ‘getResourceLocation’:

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:653:3: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  653 |   strncpy(_c->fmuUnzipLocation, fmuLocation + 8, strlen(fmuLocation + 8));

      |   ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:653:3: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:642:3: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  642 |   strncpy(_c->fmuUnzipLocation, fmuLocation + 6, strlen(fmuLocation + 6));

      |   ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:642:3: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:584:3: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  584 |   strncpy(_c->fmuUnzipLocation, fmuLocation + 5, strlen(fmuLocation + 5));

      |   ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:584:3: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:596:4: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  596 |    strncpy(_c->fmuUnzipLocation, fmuLocation + 6, strlen(fmuLocation + 6));

      |    ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:596:4: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:608:5: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  608 |     strncpy(_c->fmuUnzipLocation, fmuLocation + 7, strlen(fmuLocation + 7));

      |     ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:608:5: note: length computed here

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:621:6: warning: __builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]

  621 |      strncpy(_c->fmuUnzipLocation, fmuLocation + 8, strlen(fmuLocation + 8));

      |      ^~~~~~~

/lustre/scratch/scratch/ucftbor/mcsa/EnergyPlusToFMU-v2.1.0/SourceCode/EnergyPlus/temp-matelab.c:621:6: note: length computed here

0


Does someone know where the errors are coming from and what I can do about them? 

Thank you, 
Esther

Thierry Stephane Nouidui

unread,
Jun 19, 2020, 9:59:15 AM6/19/20
to energyplus-fmu, Esther Borkowski

I see some warnings but no error? 

Could you point me to the error?

Am Freitag, 19. Juni 2020, 16:53:29 GMT+3 hat 'Esther Borkowski' via energyplus-fmu <energyp...@googlegroups.com> Folgendes geschrieben:


--
You received this message because you are subscribed to the Google Groups "energyplus-fmu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/energyplus-fmu/e95bfe19-078c-4ac9-bd9f-a6f017a90030o%40googlegroups.com.

Esther Borkowski

unread,
Jun 19, 2020, 10:02:40 AM6/19/20
to energyplus-fmu
Sorry, I meant warnings and not errors.
There are only the warnings and yet no FMUs that are created.
To unsubscribe from this group and stop receiving emails from it, send an email to energyp...@googlegroups.com.

thierry...@yahoo.de

unread,
Jun 19, 2020, 10:12:31 AM6/19/20
to Esther Borkowski, energyplus-fmu
When you run the script on your local machine, do you see the same warnings though the FMUs are created?

Sent from my Huawei Mobile
To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/energyplus-fmu/7bea8881-1e67-4397-835b-22c53289bf30o%40googlegroups.com.

Esther Borkowski

unread,
Jun 19, 2020, 10:38:31 AM6/19/20
to energyplus-fmu
Hi Thierry,
not at all. On my local Windows machine, everything is fine and the FMUs are created smoothly.

Esther Borkowski

unread,
Jun 22, 2020, 6:27:30 AM6/22/20
to energyplus-fmu
Hi Thierry,

I have been in touch with the research computing support team from my uni, and they recommended to load another compiler instead of the default Intel compiler. I have run EnergyPlusToFMU with the GNU compiler (v4.9.2) now, and it seems to work! 

Little side note: Although EnergyPlusToFMU creates the FMUs, I still get the warnings, but they apparently do not mean that anything goes wrong.

Thanks for your help, 
Esther

Thierry Nouidui

unread,
Jun 22, 2020, 6:29:59 AM6/22/20
to Esther Borkowski, energyplus-fmu
Wonderful, glad that it works now.

To unsubscribe from this group and stop receiving emails from it, send an email to energyplus-fm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/energyplus-fmu/7c113220-37c9-471f-aae3-c78cd79fc8bfo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages