-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FMI] Add missing SourceFiles to modelDescription (#11435)
* BLAS, LAPACK and CMINPACK SourceFiles added to modelDescription * FMPy recompilation test for cross-compiled FMUs
- Loading branch information
1 parent
20ca939
commit c41724d
Showing
6 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*_FMU/ | ||
*.fmu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
FMPY_CALL = python3 -m fmpy | ||
|
||
FMU_DIRECTORY = ../FmuExportCrossCompile | ||
FMU = FmuExportCrossCompile.fmu \ | ||
RoomHeating_OM_RH.fmu \ | ||
WaterTank_Control.fmu \ | ||
WaterTank_TestSingleWaterTank.fmu \ | ||
BouncingBall.fmu | ||
|
||
.PHONY: all test | ||
|
||
all: compile_FMUs | ||
$(MAKE) test | ||
test: $(FMU) | ||
|
||
%.fmu: | ||
@echo ----------------------------------------------------------------------- | ||
@echo $@ | ||
# Remove binaries | ||
unzip -qq $(FMU_DIRECTORY)/$@ -d $@_FMU/ | ||
rm -rf $@_FMU/binaries | ||
cd $@_FMU/; zip -qqr ../$@ * | ||
rm -rf $@_FMU/ | ||
# Compile sources and simulate | ||
$(FMPY_CALL) compile $@ | ||
$(FMPY_CALL) simulate $@ | ||
@echo ----------------------------------------------------------------------- | ||
|
||
compile_FMUs: | ||
make -C ../FmuExportCrossCompile | ||
|
||
clean: | ||
rm -f $(FMU) | ||
rm -rf $(addsuffix _FMU/,$(FMU)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Re-compilation and simulation of OpenModelica FMUs with FMPy | ||
|
||
Build FMUs from [../FmuExportCrossCompile/](../FmuExportCrossCompile): | ||
|
||
```bash | ||
make compile_FMUs | ||
``` | ||
|
||
Remove binaries from FMU, re-compile each FMU with FMPy and simulate it: | ||
|
||
```bash | ||
make test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters