charmplusplus / charm4py

Parallel Programming with Python and Charm++
https://charm4py.readthedocs.io
Apache License 2.0
289 stars 21 forks source link

Charmrun.start can only run Python programs #206

Closed ZwFink closed 3 years ago

ZwFink commented 3 years ago

When invoking charmrun.start on the command line in the following manner: python3 -m charmrun.start +p2 ./hello.py it will work as expected, but if one wishes to execute a different program such as perf it will not work:

python3 -m charmrun.start +p2 `which perf` stat `which python3` examples/hello/array_hello.py 
Charmrun> scalable start enabled. 
  File "/usr/bin/perf", line 7
    case "$version" in
         ^
SyntaxError: invalid syntax

It appears that charmrun.start attempts to run the provided executable as a Python script. Running the above command using charmrun directly results in the correct behavior.