Exemplo n.º 1
0
    def execute(self,para,log):
        script=replaceValues(self.script,para)
        print_("     Changing environment variables by executing",script)
        injectVariables(script)

        return True,None
Exemplo n.º 2
0
#!/opt/rocks/python/python
#
#$ -cwd
#$ -j y
#$ -S /opt/rocks/bin/python
#$ -m be
# #$ -pe mpi 2
#
import sys,os
from os import path
from os import environ

from PyFoam.Infrastructure.ClusterJob import SolverJob
from PyFoam.FoamInformation import injectVariables
injectVariables("/home/bgschaid/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc")

environ["PATH"]+=":/home/common/bin:/home/common/pythonbin/PyFoam"
#environ["PATH"]+=environ["MPI_ARCH_PATH"]+"/bin:"+environ["PATH"]

template=sys.argv[1]
suffix=sys.argv[2]

#print environ
#print
#print "LD_LIBRARY_PATH",environ["LD_LIBRARY_PATH"]
#print
#print "MPI_ARCH_PATH",environ["MPI_ARCH_PATH"]
environ["LD_LIBRARY_PATH"]+=":"+environ["MPI_ARCH_PATH"]+"/lib"

class EmptyAndClean(SolverJob):
    def __init__(self):