hu-macsy / simexpal

Simplifying Experimental Algorithmics
https://simexpal.readthedocs.io
MIT License
17 stars 18 forks source link

error when launching without building first #134

Closed bernlu closed 1 year ago

bernlu commented 1 year ago

When launching a run that depends on a revision which has not been built, simex tries to launch the run anyway and then outputs a FileNotFoundError, because the binary does not exist (because the revision was not built). Simex then prints the status of that run as "started" forever.

It would be nice if simex could at least warn the user, or ideally handle this problem the same way missing instances are dealt with (i.e. skip launching these runs and print "Skipping run as revision is not available").

Example using examples/sorting_cpp:

  1. Install instances
  2. simex e launch
    Launching experiment 'quick-sort', instance 'uniform-n1000-s1' on local machine
    Traceback (most recent call last):
    File "/usr/local/bin/simex", line 853, in <module>
    main_args.cmd(main_args)
    File "/usr/local/bin/simex", line 648, in do_experiments_launch
    submit_to_launcher(cfg, launcher_runs)
    File "/usr/local/bin/simex", line 646, in submit_to_launcher
    launcher.submit(cfg, run)
    File "/usr/local/lib/python3.10/dist-packages/simexpal/launch/fork.py", line 13, in submit
    common.invoke_run(manifest)
    File "/usr/local/lib/python3.10/dist-packages/simexpal/launch/common.py", line 414, in invoke_run
    child = subprocess.Popen(cmd, cwd=cwd, env=environ,
    File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'quicksort'
  3. simex e list
    
    Experiment                                    Instance                            Status
    ----------                                    --------                            ------
    quick-sort ~ ba-bubble, bs32 @ main           uniform-n1000-s1                    [0] started
    quick-sort ~ ba-bubble, bs32 @ main           uniform-n1000-s2                    [0] not submitted
    quick-sort ~ ba-bubble, bs64 @ main           uniform-n1000-s1                    [0] not submitted
    quick-sort ~ ba-bubble, bs64 @ main           uniform-n1000-s2                    [0] not submitted
    quick-sort ~ ba-insert, bs32 @ main           uniform-n1000-s1                    [0] not submitted
    quick-sort ~ ba-insert, bs32 @ main           uniform-n1000-s2                    [0] not submitted
    6 experiments in total```
duylethanh commented 1 year ago

Are you using the latest version of simexpal? I can not reproduce your error. In the latest version all runs will fail and be displayed as such (Status: failed).