camlspotter / HybridLearner

HybridLearner: A tool to learn Hybrid Systems for Cyber Physical Systems
GNU General Public License v3.0
0 stars 0 forks source link

./HybridLearner core-dumps when it fails to find run.py #4

Open camlspotter opened 1 month ago

camlspotter commented 1 month ago

run.py is from learnHA, which should exist as a sub-repository.

Log:

$ sh ./run_main_HybridLearner.sh 
results folder already exists!
/home/jun/.pyenv/versions/3.8.19/bin/python3: can't open file 'run.py': [Errno 2] No such file or directory
cp: cannot stat '../src/learnHA/oscillator_64.txt': No such file or directory
cp: cannot stat '/home/jun/hal/HybridLearner/src/learnHA/oscillator_64.txt': No such file or directory
terminate called after throwing an instance of 'std::exception*'
./run_results_main_learn_models.sh: line 19: 2412029 Aborted                 (core dumped) ./HybridLearner --simulink-mod\
el-file ../src/test_cases/engine/learn_ha_loop/oscillator.slx --engine learn-ha-loop --variable-category 'x:output, y:out\
put' --output-file oscillator_64.txt --simu-init-size 64 --initial-value 'x>=0.01 & x<=0.09 & y>=0.01 & y<=0.09' --time-h\
orizon 10 --sampling-time 0.01 --modes 4 --degree 1 --boundary-degree 1 --segment-relative-error 0.1 --segment-relative-f\
ine-error 0.01 --precision-equivalence 100.0 --max-traces 3 --max-stoptime 20 --invariant 2 --cluster-algo dtw --correlat\
ion-threshold 0.89 --distance-threshold 1.0 --max-generate-trace-size 1024 --ode-speedup 50 --filter-last-segment 1 --sol\
ver-type fixed --ode-solver FixedStepAuto > ../results/outputOsci_withoutType.txt
camlspotter commented 1 month ago

void learnHA_caller(user_inputs::ptr user_Inputs) must fail if python script execution fails.

camlspotter commented 1 month ago

Even with learnHA/run.py, HybridLearner fails to execute run.py

$ ls learnHA/run.py
learnHA/run.py
$ cd build
$ sh ./run_main_HybridLearner.sh
/home/jun/.pyenv/versions/3.8.19/bin/python3: can't open file 'run.py': [Errno 2] No such file or directory
cp: cannot stat '../src/learnHA/oscillator_64.txt': No such file or directory
cp: cannot stat '/home/jun/hal/HybridLearner/src/learnHA/oscillator_64.txt': No such file or directory
terminate called after throwing an instance of 'std::exception*'
./run_results_main_learn_models.sh: line 19: 2418825 Aborted                 (core dumped) ./HybridLearner --simulink-mod\
el-file ../src/test_cases/engine/learn_ha_loop/oscillator.slx --engine learn-ha-loop --variable-category 'x:output, y:out\
put' --output-file oscillator_64.txt --simu-init-size 64 --initial-value 'x>=0.01 & x<=0.09 & y>=0.01 & y<=0.09' --time-h\
orizon 10 --sampling-time 0.01 --modes 4 --degree 1 --boundary-degree 1 --segment-relative-error 0.1 --segment-relative-f\
ine-error 0.01 --precision-equivalence 100.0 --max-traces 3 --max-stoptime 20 --invariant 2 --cluster-algo dtw --correlat\
ion-threshold 0.89 --distance-threshold 1.0 --max-generate-trace-size 1024 --ode-speedup 50 --filter-last-segment 1 --sol\
ver-type fixed --ode-solver FixedStepAuto > ../results/outputOsci_withoutType.txt
camlspotter commented 1 month ago

Ah, no, learnHA must be under src/!

camlspotter commented 1 month ago
# edit .gitmodules
git submodule init
git submodule update