python/methylnet/torque_jobs.py
def run_torque_job_(replace_dict, additional_options=""):
    """Run torque job after creating submission script.

    Parameters
    ----------
    replace_dict : type
        Dictionary used to replace information in bash script to run torque job.
    additional_options : type
        Additional options to pass scheduler.

    Returns
    -------
    str
        Custom torque job name.

    """
    txt="""#!/bin/bash -l
#PBS -N run_torque
#PBS -q QUEUE
NGPU
USE_GPU
#PBS -l walltime=TIME:00:00
#PBS -j oe
cd $PBS_O_WORKDIR
GPU_SETUP
ADDITIONS
COMMAND"""
    for k,v in replace_dict.items():
        txt = txt.replace(k,v)
    with open('torque_job.sh','w') as f:
        f.write(txt)
    job=os.popen("mksub {} {}".format('torque_job.sh',additional_options)).read().strip('\n')
    print("Submitted job: {}".format(job))
    return job
Run torque job after creating submission script.

    Parameters
    ----------
    replace_dict : type
        Dictionary used to replace information in bash script to run torque job.
    additional_options : type
        Additional options to pass scheduler.

    Returns
    -------
    str
        Custom torque job name.

    
Run torque job after creating submission script.
Parameters

replace_dict : type
Dictionary used to replace information in bash script to run torque job.
additional_options : type
Additional options to pass scheduler.

Returns

str
Custom torque job name.
Run torque job after creating submission script . Parameters replace_dict : type Dictionary used to replace information in bash script to run torque job . additional_options : type Additional options to pass scheduler . Returns str Custom torque job name .
def run_torque_job_(replace_dict, additional_options=""):
    txt="""#!/bin/bash -l
#PBS -N run_torque
#PBS -q QUEUE
NGPU
USE_GPU
#PBS -l walltime=TIME:00:00
#PBS -j oe
cd $PBS_O_WORKDIR
GPU_SETUP
ADDITIONS
COMMAND"""
    for k,v in replace_dict.items():
        txt = txt.replace(k,v)
    with open('torque_job.sh','w') as f:
        f.write(txt)
    job=os.popen("mksub {} {}".format('torque_job.sh',additional_options)).read().strip('\n')
    print("Submitted job: {}".format(job))
    return job
def run_torque_job_ ( replace_dict , additional_options = "" ) : txt = """#!/bin/bash -l
#PBS -N run_torque
#PBS -q QUEUE
NGPU
USE_GPU
#PBS -l walltime=TIME:00:00
#PBS -j oe
cd $PBS_O_WORKDIR
GPU_SETUP
ADDITIONS
COMMAND""" for k , v in replace_dict . items ( ) : txt = txt . replace ( k , v ) with open ( 'torque_job.sh' , 'w' ) as f : f . write ( txt ) job = os . popen ( "mksub {} {}" . format ( 'torque_job.sh' , additional_options ) ) . read ( ) . strip ( '\n' ) print ( "Submitted job: {}" . format ( job ) ) return job
Run torque job after creating submission script.
Run torque job after creating submission script .
"""Run torque job after creating submission script.

    Parameters
    ----------
    replace_dict : type
        Dictionary used to replace information in bash script to run torque job.
    additional_options : type
        Additional options to pass scheduler.

    Returns
    -------
    str
        Custom torque job name.

    """
replace_dict
additional_options