RemoteThreadJob.submit_script (function)
def submit_script(self, script, files=[], nprocs=None, ignore_files=[], wait_for_job_status=False, trial_run=False)
Submit a script to the server in the RemoteThreadJob.conda_env.
This will copy script (modified with the provided slurm options) and
files to RemoteThreadJob.remote_directory on the remote server and
run the script in a thread (without a scheduler). To check on its status,
see RemoteThreadJob.job_status.
To check on any expected output files, call RemoteThreadJob.check_output.
See RemoteThreadJob.run_script to run a script and wait for it to complete.
Arguments
script(string or list): shell script to run on the remote server, including any necessary installation steps. Note that the script can call any other scripts infiles. If a string, must be the path of a valid file which will be copied to the server. If a list, must be a list of commands (i.e. a newline will be placed between each item in the list and sent as a single script to the server).files(list, optional, default=[]): list of paths to additional files to copy to the server required in order to successfully executescript.ignore_files(list, optional, default=[]): list of filenames on the remote server to ignore when calling RemoteThreadJob.check_outputwait_for_job_status(bool or string or list, optional, default=False): Whether to wait for a specific job_status. If True, will default to 'complete'. See also RemoteThreadJob.wait_for_job_status.trial_run(bool, optional, default=False): if True, the commands that would be sent to the server are returned but not executed.
Returns
Raises
- ValueError: if a script has already been submitted within this RemoteThreadJob instance.
- TypeError: if
scriptorfilesare not valid types. - ValueError: if the files referened by
scriptorfilesare not valid.