Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Creates a launch script using the information specified by the configuration object

The configuration object specifies the following parameters
        
        numberOfNodes
        processorsPerNode
        runDir
        logDir
        executable
        queue(more...)

        def PBSScriptFromConfiguration(configuration, arguments, runDirectory=None, logDirectory=None):

	'''Creates a launch script using the information specified by the configuration object
	
	The configuration object specifies the following parameters
		
		numberOfNodes
		processorsPerNode
		runDir
		logDir
		executable
		queue
		keep
		
	However runDir and logDir can be overridden	
		
	The arguments to the executable must be passed to this function'''	

	numberOfNodes = configuration.get('PARALLEL', 'numberOfNodes')
	processorsPerNode = configuration.get('PARALLEL', 'processorsPerNode')
	executable = configuration.get('PARALLEL', 'executable')
	
	if runDirectory is None:
		runDirectory = configuration.get('PARALLEL', 'runDirectory')
	if logDirectory is None:	
		logDirectory = configuration.get('PARALLEL', 'logDirectory')
	
	try:
		queue = configuration.get('PARALLEL', 'queue')
	except ConfigParser.NoOptionError:
		queue = "short"
		
	try:
		keep = configuration.get('PARALLEL', 'keep')
	except ConfigParser.NoOptionError:
		keep = False	

	pbsScript = CreatePBSLaunchScript(executable=executable,
			arguments=arguments,
			numberOfNodes=numberOfNodes,
			processorsPerNode=processorsPerNode,
			queue=queue,
			runDirectory=runDirectory,
			logDirectory=logDirectory,
			keep=keep)
	
	return pbsScript
        


src/p/e/PEATDB-2.3/PEATSA/WebApp/RemoteLaunch.py   PEATDB(Download)
 
	#Create PBS file
	pbsScript = PEATSAParallel.PBSScriptFromConfiguration(options, arguments=sys.argv[1:], 
					 runDirectory=outputDirectory, logDirectory=outputDirectory)