Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git LFS not installed/initialized in testing/Dockerfile #613

Closed
mattrobmattrob opened this issue Feb 3, 2024 · 0 comments · Fixed by #614
Closed

Git LFS not installed/initialized in testing/Dockerfile #613

mattrobmattrob opened this issue Feb 3, 2024 · 0 comments · Fixed by #614

Comments

@mattrobmattrob
Copy link
Contributor

Git LFS not installed/initialized in testing/Dockerfile results in only (AFAIK) EnergyPlus related files not being checked out from https://github.com/lbl-srg/modelica-buildings such as libModelicaBuildingsEnergyPlus.so among others in the following list from the modelica-buildings repo:

$ git lfs ls-files --all
db49be9c64 - Buildings/Resources/Library/linux64/libModelicaBuildingsEnergyPlus.so
8669d4ff3d - Buildings/Resources/Library/linux64/libModelicaBuildingsEnergyPlus_9_6_0.so
c18e8e3d73 * Buildings/Resources/Library/linux64/libfmilib_shared.so
011fc668cf - Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus_9_6_0.dll
65989657c0 - Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus_9_6_0.lib
93186d3038 - Buildings/Resources/Library/win64/VCRUNTIME140.dll
35639f8396 * Buildings/Resources/Library/win64/fmilib_shared.dll
b972d511d9 * Buildings/Resources/Library/win64/fmilib_shared.lib
b8330cd751 - Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones1.fmu
515838369e - Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu
46aee6b4e4 - Buildings/Resources/Library/linux64/libModelicaBuildingsEnergyPlus_9_6_0.so
d73b192db0 - Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus_9_6_0.dll
4ba176cb08 - Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus_9_6_0.dll
c82a846c8b - Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones1.fmu
65507ae091 - Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu
5e175865a0 - Buildings/Resources/Library/linux64/libModelicaBuildingsEnergyPlus.so
337925f242 - Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus.dll
e5e260c36c * Buildings/Resources/Library/win64/ModelicaBuildingsEnergyPlus.lib
...

This results in linker failures towards the end of a Modelica + Spawn of EnergyPlus compilation because these files aren't actually downloaded from Git LFS:

$ make compile_testcase_model TESTCASE=spawnrefsmalloffice
...
/usr/bin/ld:/home/developer/git/modelica-buildings/Buildings/Resources/Library/linux64/[libModelicaBuildingsEnergyPlus.so](http://libmodelicabuildingsenergyplus.so/): file format not recognized; treating as linker script
/usr/bin/ld:/home/developer/git/modelica-buildings/Buildings/Resources/Library/linux64/[libModelicaBuildingsEnergyPlus.so](http://libmodelicabuildingsenergyplus.so/):1: syntax error
collect2: error: ld returned 1 exit status
make[1]: *** [fmume20_] Error 1
make: *** [fmume20] Error 2
...
/usr/local/JModelica/Makefiles/MakeFile:163: recipe for target 'fmume20' failed
Unknown program error, org.jmodelica.util.exceptions.CcodeCompilationException: Compilation of generated C code failed.
C file location: /tmp/jmc807535789236270263out/sources/SpawnRefSmallOfficeBuilding.c
Traceback (most recent call last):
  File "compile_fmu.py", line 50, in <module>
    fmupath = parser.export_fmu(modelpath, [mopath])
  File "/usr/local/testing/parsing/parser.py", line 213, in export_fmu
    instances, signals = parse_instances(model_path, file_name)
  File "/usr/local/testing/parsing/parser.py", line 45, in parse_instances
    fmu_path = compile_fmu(model_path, file_name)
  File "/usr/local/JModelica/Python/pymodelica/compiler.py", line 148, in compile_fmu
    separate_process, jvm_args)
  File "/usr/local/JModelica/Python/pymodelica/compiler.py", line 257, in _compile_unit
    compiler_options, compile_to, compiler_log_level, jvm_args)
  File "/usr/local/JModelica/Python/pymodelica/compiler.py", line 378, in compile_separate_process
    return log.end();
  File "/usr/local/JModelica/Python/pymodelica/compiler_logging.py", line 332, in end
    raise CcodeCompilationError(exception.message)
pymodelica.compiler_exceptions.CcodeCompilationError: Compilation of generated C code failed.
C file location: /tmp/jmc807535789236270263out/sources/SpawnRefSmallOfficeBuilding.c
make[1]: *** [exec_jm] Error 1
make: *** [compile_testcase_model] Error 2
mattrobmattrob added a commit to mattrobmattrob/project1-boptest that referenced this issue Feb 3, 2024
This addition allows me to compile a Modelica + Spawn of EnergyPlus emulator without issues. Otherwise, there are EnergyPlus related linker errors due to a file that is unlikely to be correct on the filesystem:

```
/usr/bin/ld:/home/developer/git/modelica-buildings/Buildings/Resources/Library/linux64/[libModelicaBuildingsEnergyPlus.so](http://libmodelicabuildingsenergyplus.so/): file format not recognized; treating as linker script
```

Fixes ibpsa#613.

Signed-off-by: Matt Robinson <mattrob@hey.com>
dhblum added a commit that referenced this issue Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant