prepared_network.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 t.checklist = { \
3  'finab.dat' : { 'method':'default', 'tolerance':2.0e-2,"lowerlimit":1e-9 }, \
4 }
5 t.program = t.basedir + "/bin/winnet"
6 t.testdir = t.basedir + "/test/" + t.testname
7 t.logfile = t.testdir + ".log"
8 t.arcfile = t.testdir + ".tar.gz"
9 
10 
12  # Create a prepared network folder
13  prepared_network_path = "../network_data"
14  os.chdir(t.testdir+"/testrun")
15  command= t.program+" "+t.parfile_name+" "+prepared_network_path+" >Prepare_OUT 2>Prepare_ERR \n"
16  subprocess.call("ulimit -s unlimited\n" + command + \
17  """echo $! > PID
18  if [ $? -ne 0 ]; then
19  echo "Test simulation with PID #`cat PID` probably failed to prepare."
20  echo "Check """+t.testdir+"""/testrun/ERR for errors"
21  fi
22  """, shell=True)
23 
24  # Delete the network data from the parameter file to see if it works only with the prepared network folder
25  command = "sed -i '/^net_source/d' "+t.parfile_name+ '&& sed -i "/^reaclib_file/d" '+t.parfile_name +\
26  '&& sed -i "/^isotopes_file/d" '+t.parfile_name
27  subprocess.call(command, shell=True)
28  return 0
29 
30 
31 t.prepare_function = prepare_function
prepared_network.prepare_function
def prepare_function()
Definition: prepared_network.py:11