Skip to content

Instantly share code, notes, and snippets.

@dstuebe
Created August 7, 2013 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstuebe/6170563 to your computer and use it in GitHub Desktop.
Save dstuebe/6170563 to your computer and use it in GitHub Desktop.
A program for launching other programs - indirection to try to solve issues with using Java Process Builder to run OpenMPI programs in windows... For instance: C:\Python27\python.exe run_job.py C:\Python27\Lib\site-packages\mpi4py\bin\mpiexec.exe -n 2 C:\Python27\python.exe parallel_program.py
#!/usr/bin/env python
import subprocess
import sys
if __name__ == '__main__':
args = sys.argv[1:]
p = subprocess.Popen(args, stdout=sys.stdout, stderr=sys.stderr)
p.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment