You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python test_sem.py
Building ns-3: 100%|█████████████████████████████████| 2/2 [00:00<00:00, 58.40file/s]
Building ns-3: 100%|█████████████████████████████████| 2/2 [00:00<00:00, 54.63file/s]
Running simulations: 0%|| 0/1 [00:00<?, ?simulation/s]
Traceback (most recent call last):
File "/home/djvergad/research/run_sims_dash_lena2/test_sem.py", line 3, in<module>
campaign.run_missing_simulations({}, runs=1)
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/manager.py", line 520, in run_missing_simulations
self.run_simulations(
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/manager.py", line 358, in run_simulations
self.run_and_save_results(result_generator)
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/manager.py", line 368, in run_and_save_results
forresultin result_generator:
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/tqdm/std.py", line 1181, in __iter__
forobjin iterable:
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/parallelrunner.py", line 36, in run_simulations
forresultin pool.imap_unordered(self.launch_simulation,
File "/usr/lib/python3.11/multiprocessing/pool.py", line 873, in next
raise value
File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/parallelrunner.py", line 54, in launch_simulation
return next(SimulationRunner.run_simulations(self, [parameter],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/djvergad/research/run_sims_dash_lena2/venv/lib/python3.11/site-packages/sem/runner.py", line 342, in run_simulations
return_code = subprocess.call(command, cwd=temp_dir,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1834, in _execute_child
self.pid = _fork_exec(
^^^^^^^^^^^
ValueError: embedded null byte
The real issue is that the zero parameter is treated like a null byte in python:
If you add print(f"command: {command}")
in file sem/runner.py line 341, you will see the following:
I believe that the problem should be either be fixed to allow for zero-valued parameters, or at least the error message to show more precisely the root cause, because it is not easy to realize what is causing this error message.
Consider the following test program (named
scratch/scratch-simulator.cc
:And the following
python
script:It fails with the following error:
The real issue is that the zero parameter is treated like a null byte in python:
If you add
print(f"command: {command}")
in file
sem/runner.py
line 341, you will see the following:which shows the problem.
The workaround is to define all zero parameters explicitly, e.g. this script works:
But this is not at all obvious.
I believe that the problem should be either be fixed to allow for zero-valued parameters, or at least the error message to show more precisely the root cause, because it is not easy to realize what is causing this error message.
environment is:
ns-3.43
from https://gitlab.com/nsnam/ns-3-dev.gitsem==0.3.9.1
from default pip repositories.The text was updated successfully, but these errors were encountered: