Permalink
Browse files

redirect output and error

  • Loading branch information...
amal-ghamdi committed May 27, 2011
1 parent 485f243 commit 55db01e7862e7e30df506ee05fbde1e280cb3aab
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/acoustics/2d/homogeneous/parallelAcoustics.py
@@ -11,12 +11,12 @@ def acoustics2D(use_PETSc=True,kernel_language='Fortran',iplot=False,petscPlot=F
# clean the previous output
run_command = "rm", "-r", outputPath
- p = subprocess.Popen(run_command)
+ p = subprocess.Popen(run_command, stdout=subprocess.PIPE ,stderr=subprocess.STDOUT)
(stdout_data, ignore) = p.communicate()
# run subprocess with the required number of processes
run_command = "mpiexec", "-n", str(np) ,"python","-c", "import sys; sys.path.append('"+str(examplePath)+"'); import acoustics; acoustics.acoustics2D(use_PETSc=True, useController=True, outdir='"+str(outputPath)+"')"
- p = subprocess.Popen(run_command)
+ p = subprocess.Popen(run_command, stdout=subprocess.PIPE ,stderr=subprocess.STDOUT)
(stdout_data, ignore) = p.communicate()
sol = Solution(10, format='petsc', path=outputPath )

0 comments on commit 55db01e

Please sign in to comment.