def run_cadd(exefile,lammpsoutput=False,cleanup=True,simname=None,inputpath=paths.inputpath,runpath=paths.runpath,outputpath=paths.outputpath): if simname is None: simname = get_simname(inputpath) make_main_file(simname,inputpath) copy_input_files(inputpath,runpath) bashcommand = './{0}'.format(exefile) process = Popen([bashcommand],stdout=PIPE,stderr=PIPE,cwd=runpath) err = mc.read_write_process(process) if err: raise mc.SubprocessError('Running the executable',err) copy_output_files(outputpath,runpath) if mc.convert_arg_to_logical(cleanup): clean_up_files(runpath,exefile) if mc.convert_arg_to_logical(lammpsoutput): lammps_output(outputpath)
def compile_cadd_and_move(exefile, clean=False, compiletype='release', compilepath=paths.compilepath, runpath=paths.runpath): clean = mc.convert_arg_to_logical(clean) compile_cadd(compiletype, compilepath, clean) move_executable(exefile, compilepath, runpath)
def run_cadd( exefile, lammpsoutput=False, cleanup=True, simname=None, inputpath=paths.inputpath, runpath=paths.runpath, outputpath=paths.outputpath, ): if simname is None: simname = get_simname(inputpath) make_main_file(simname, inputpath) copy_input_files(inputpath, runpath) bashcommand = "./{0}".format(exefile) process = Popen([bashcommand], stdout=PIPE, stderr=PIPE, cwd=runpath) err = mc.read_write_process(process) if err: raise mc.SubprocessError("Running the executable", err) copy_output_files(outputpath, runpath) if mc.convert_arg_to_logical(cleanup): clean_up_files(runpath, exefile) if mc.convert_arg_to_logical(lammpsoutput): lammps_output(outputpath)
def compile_cadd_and_move(exefile,clean=False,compiletype='release',compilepath=paths.compilepath,runpath=paths.runpath): clean = mc.convert_arg_to_logical(clean) compile_cadd(compiletype,compilepath,clean) move_executable(exefile,compilepath,runpath)