I'm having a problem with the module subprocess; I'm running a script from Python:
subprocess.Popen('./run_pythia.sh', shell=True).communicate()
and sometimes it just blocks and it doesn't finish to execute the script. Before I was using .wait()
, but I switched to .communicate()
. Nevertheless the problem continues.
First the script compiles a few files, then it execute into a file:
run_pythia.sh
:
#!/bin/bash
#PBS -l walltime=1:00:00
./compile.sh
./exec > resultado.txt
compile.sh
:
O=`find ./ -name "*.o" | xargs`
# LOAD cernlib2005
module load libs/cernlib/2005
# Compile and Link
FC=g77
CERNLIBPATH="-L/software/local/cernlib/2005/lib -lpacklib"
$FC call_pyth_mix.f analise_tt.f $O $CERNLIBPATH -o exec