Skip to content

Commit 12a07bd

Browse files
authored
Disabeling BaseModelica.jl pre-compilation (#257)
* BaeModelica.jl disable system image pre-compilation
1 parent eafd878 commit 12a07bd

File tree

4 files changed

+50
-53
lines changed

4 files changed

+50
-53
lines changed

.CI/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def runRegressiontest(branch, name, extraFlags, omsHash, dbPrefix, sshConfig, om
718718
sh """
719719
julia --project=TestBaseModelica -e 'import Pkg; Pkg.build(verbose=true); Pkg.precompile()'
720720
"""
721-
JULIA_TESTTING_FLAG="--basemodelica-mtk-import"
721+
JULIA_TESTTING_FLAG="--basemodelica-mtk-import --no-julia-sys-image"
722722
}
723723

724724
OMCPATH = "${omcompiler ? '../' : './'}OMCompiler"

TestBaseModelica/Manifest.toml

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.12.2"
3+
julia_version = "1.11.7"
44
manifest_format = "2.0"
5-
project_hash = "ff02b4387029154838b392dfec68ad8bb41640a1"
5+
project_hash = "25e7a480ef4d37391d5758c9e976208fa64c525f"
66

77
[[deps.ADTypes]]
88
git-tree-sha1 = "8be2ae325471fc20b11c27bb34b518541d07dd3a"
@@ -246,7 +246,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
246246
[[deps.CompilerSupportLibraries_jll]]
247247
deps = ["Artifacts", "Libdl"]
248248
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
249-
version = "1.3.0+1"
249+
version = "1.1.1+0"
250250

251251
[[deps.CompositeTypes]]
252252
git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768"
@@ -501,7 +501,7 @@ version = "0.7.16"
501501
[[deps.Downloads]]
502502
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
503503
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
504-
version = "1.7.0"
504+
version = "1.6.0"
505505

506506
[[deps.DynamicPolynomials]]
507507
deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"]
@@ -839,11 +839,6 @@ git-tree-sha1 = "937da4713526b96ac9a178e2035019d3b78ead4a"
839839
uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4"
840840
version = "0.4.10"
841841

842-
[[deps.JuliaSyntaxHighlighting]]
843-
deps = ["StyledStrings"]
844-
uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011"
845-
version = "1.12.0"
846-
847842
[[deps.JumpProcesses]]
848843
deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "PoissonRandom", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"]
849844
git-tree-sha1 = "746d3ac930339ca8a37590892c98493fba89e9d3"
@@ -895,9 +890,9 @@ version = "0.1.17"
895890

896891
[[deps.LazyArrays]]
897892
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"]
898-
git-tree-sha1 = "0f68899e54e5e98cff674bbe6380bcf89f603787"
893+
git-tree-sha1 = "af3b88d1f2602712d0039ae6e5b610a4bbd959a1"
899894
uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02"
900-
version = "2.9.1"
895+
version = "2.9.2"
901896

902897
[deps.LazyArrays.extensions]
903898
LazyArraysBandedMatricesExt = "BandedMatrices"
@@ -922,24 +917,24 @@ uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
922917
version = "0.6.4"
923918

924919
[[deps.LibCURL_jll]]
925-
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"]
920+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
926921
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
927-
version = "8.15.0+0"
922+
version = "8.6.0+0"
928923

929924
[[deps.LibGit2]]
930-
deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
925+
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
931926
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
932927
version = "1.11.0"
933928

934929
[[deps.LibGit2_jll]]
935-
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"]
930+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
936931
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
937-
version = "1.9.0+0"
932+
version = "1.7.2+0"
938933

939934
[[deps.LibSSH2_jll]]
940-
deps = ["Artifacts", "Libdl", "OpenSSL_jll"]
935+
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
941936
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
942-
version = "1.11.3+1"
937+
version = "1.11.0+1"
943938

944939
[[deps.Libdl]]
945940
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -964,7 +959,7 @@ version = "7.4.1"
964959
[[deps.LinearAlgebra]]
965960
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
966961
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
967-
version = "1.12.0"
962+
version = "1.11.0"
968963

969964
[[deps.LinearSolve]]
970965
deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"]
@@ -1069,7 +1064,7 @@ uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667"
10691064
version = "0.1.8"
10701065

10711066
[[deps.Markdown]]
1072-
deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"]
1067+
deps = ["Base64"]
10731068
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
10741069
version = "1.11.0"
10751070

@@ -1083,6 +1078,11 @@ weakdeps = ["SparseArrays"]
10831078
[deps.MaybeInplace.extensions]
10841079
MaybeInplaceSparseArraysExt = "SparseArrays"
10851080

1081+
[[deps.MbedTLS_jll]]
1082+
deps = ["Artifacts", "Libdl"]
1083+
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
1084+
version = "2.28.6+0"
1085+
10861086
[[deps.MicroMamba]]
10871087
deps = ["Pkg", "Scratch", "micromamba_jll"]
10881088
git-tree-sha1 = "011cab361eae7bcd7d278f0a7a00ff9c69000c51"
@@ -1101,9 +1101,9 @@ version = "1.11.0"
11011101

11021102
[[deps.ModelingToolkit]]
11031103
deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FillArrays", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "ImplicitDiscreteSolve", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "OffsetArrays", "OrderedCollections", "OrdinaryDiffEqCore", "PreallocationTools", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"]
1104-
git-tree-sha1 = "ea3a5c734abae9de7f892e1f63f1549e7d1a7179"
1104+
git-tree-sha1 = "179338bcf2475961651552e00090014bb750c858"
11051105
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
1106-
version = "10.29.0"
1106+
version = "10.30.0"
11071107

11081108
[deps.ModelingToolkit.extensions]
11091109
MTKBifurcationKitExt = "BifurcationKit"
@@ -1131,7 +1131,7 @@ version = "0.3.7"
11311131

11321132
[[deps.MozillaCACerts_jll]]
11331133
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
1134-
version = "2025.5.20"
1134+
version = "2023.12.12"
11351135

11361136
[[deps.MuladdMacro]]
11371137
git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab"
@@ -1168,7 +1168,7 @@ version = "1.1.3"
11681168

11691169
[[deps.NetworkOptions]]
11701170
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
1171-
version = "1.3.0"
1171+
version = "1.2.0"
11721172

11731173
[[deps.NonlinearSolve]]
11741174
deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"]
@@ -1273,17 +1273,12 @@ weakdeps = ["Adapt"]
12731273
[[deps.OpenBLAS_jll]]
12741274
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
12751275
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
1276-
version = "0.3.29+0"
1276+
version = "0.3.27+1"
12771277

12781278
[[deps.OpenLibm_jll]]
12791279
deps = ["Artifacts", "Libdl"]
12801280
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
1281-
version = "0.8.7+0"
1282-
1283-
[[deps.OpenSSL_jll]]
1284-
deps = ["Artifacts", "Libdl"]
1285-
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
1286-
version = "3.5.4+0"
1281+
version = "0.8.5+0"
12871282

12881283
[[deps.OpenSpecFun_jll]]
12891284
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"]
@@ -1543,7 +1538,7 @@ version = "1.3.0"
15431538
[[deps.Pkg]]
15441539
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"]
15451540
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1546-
version = "1.12.0"
1541+
version = "1.11.0"
15471542
weakdeps = ["REPL"]
15481543

15491544
[deps.Pkg.extensions]
@@ -1597,9 +1592,9 @@ version = "0.4.34"
15971592

15981593
[[deps.PrecompileTools]]
15991594
deps = ["Preferences"]
1600-
git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77"
1595+
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
16011596
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1602-
version = "1.3.3"
1597+
version = "1.2.1"
16031598

16041599
[[deps.Preferences]]
16051600
deps = ["TOML"]
@@ -1656,7 +1651,7 @@ version = "2.11.2"
16561651
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
16571652

16581653
[[deps.REPL]]
1659-
deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"]
1654+
deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"]
16601655
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
16611656
version = "1.11.0"
16621657

@@ -1911,7 +1906,7 @@ version = "1.2.2"
19111906
[[deps.SparseArrays]]
19121907
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
19131908
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1914-
version = "1.12.0"
1909+
version = "1.11.0"
19151910

19161911
[[deps.SparseMatrixColorings]]
19171912
deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"]
@@ -2037,7 +2032,7 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
20372032
[[deps.SuiteSparse_jll]]
20382033
deps = ["Artifacts", "Libdl", "libblastrampoline_jll"]
20392034
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
2040-
version = "7.8.3+2"
2035+
version = "7.7.0+0"
20412036

20422037
[[deps.SymbolicIndexingInterface]]
20432038
deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"]
@@ -2132,12 +2127,6 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
21322127
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
21332128
version = "1.11.0"
21342129

2135-
[[deps.TestBaseModelica]]
2136-
deps = ["BaseModelica", "CSV", "DataFrames", "ModelingToolkit", "SciMLBase"]
2137-
path = "."
2138-
uuid = "bba3f925-4bbc-4b14-b723-9b95a7c9c63c"
2139-
version = "0.1.0"
2140-
21412130
[[deps.TestItems]]
21422131
git-tree-sha1 = "42fd9023fef18b9b78c8343a4e2f3813ffbcefcb"
21432132
uuid = "1c621080-faea-4a02-84b6-bbd5e436b8fe"
@@ -2235,12 +2224,12 @@ version = "1.6.1"
22352224
[[deps.Zlib_jll]]
22362225
deps = ["Libdl"]
22372226
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
2238-
version = "1.3.1+2"
2227+
version = "1.2.13+1"
22392228

22402229
[[deps.libblastrampoline_jll]]
22412230
deps = ["Artifacts", "Libdl"]
22422231
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
2243-
version = "5.15.0+0"
2232+
version = "5.11.0+0"
22442233

22452234
[[deps.micromamba_jll]]
22462235
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"]
@@ -2251,7 +2240,7 @@ version = "1.5.12+0"
22512240
[[deps.nghttp2_jll]]
22522241
deps = ["Artifacts", "Libdl"]
22532242
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
2254-
version = "1.64.0+1"
2243+
version = "1.59.0+0"
22552244

22562245
[[deps.oneTBB_jll]]
22572246
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"]
@@ -2260,9 +2249,9 @@ uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e"
22602249
version = "2022.0.0+1"
22612250

22622251
[[deps.p7zip_jll]]
2263-
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
2252+
deps = ["Artifacts", "Libdl"]
22642253
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
2265-
version = "17.7.0+0"
2254+
version = "17.4.0+2"
22662255

22672256
[[deps.pixi_jll]]
22682257
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"]

basemodelica.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import monotonic
22
import os.path
33
import shutil
4-
import subprocess
54
import warnings
65

76
from omcommon import friendlyStr
@@ -35,8 +34,8 @@ def precompile_testbaesmodelica(systemImage: os.PathLike | None = None) -> None:
3534
"""
3635

3736
start = monotonic.monotonic()
38-
print("Updating Julia package TestBaseModelica")
3937

38+
print("Updating Julia package TestBaseModelica.jl")
4039
jl.seval('import Pkg;'
4140
'Pkg.activate();'
4241
'Pkg.add("PackageCompiler");'
@@ -46,6 +45,7 @@ def precompile_testbaesmodelica(systemImage: os.PathLike | None = None) -> None:
4645
'Pkg.status();')
4746

4847
if systemImage == None:
48+
print("Developing TestBaseModelica.jl")
4949
jl.seval('Pkg.activate();'
5050
'Pkg.develop(path="TestBaseModelica");'
5151
'Pkg.precompile("TestBaseModelica")')

testmodel.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,17 @@ def sendExpressionOldOrNew(cmd):
549549
fp.write("test_settings = TestSettings(modelname=\"%s\", solver_settings=solver_settings)\n" % (conf["fileName"]))
550550
fp.write("run_test(\"%s.mo\"; settings = test_settings)\n" % (conf["modelName"]))
551551

552-
cmd = "julia"
552+
# Get correct julia executable / system image
553553
if conf["julia-system-image"] != "":
554-
cmd += " --sysimage=%s" % conf["julia-system-image"]
554+
cmd = "julia --sysimage=%s" % conf["julia-system-image"]
555+
else:
556+
try:
557+
from juliacall import CONFIG
558+
cmd = CONFIG["exepath"]
559+
except (ImportError, Exception) as e:
560+
print(e)
561+
cmd = "julia" # Fallback to system Julia
562+
555563
cmd += " %s" % juliaCallFile
556564
with open(simFile,"w") as fp:
557565
with open(juliaCallFile, "r") as juliaFile:

0 commit comments

Comments
 (0)