Specifying a job input file

Procedure

  • Use bsub -i input_file and bsub -is input_file to get the standard input for the job from the file path name specified by input_file.

    input_file can be an absolute path or a relative path to the current working directory, and can be any type of file though it is typically a shell script text file.

    The -is option spools the input file to the directory specified by the JOB_SPOOL_DIR parameter in lsb.params, and uses the spooled file as the input file for the job.

    Note: With bsub -i you can use the special characters %J and %I in the name of the input file. %J is replaced by the job ID. %I is replaced by the index of the job in the array, if the job is a member of an array, otherwise by 0 (zero).
  • Use bsub -is to change the original input file before the job completes. Removing or modifying the original input file does not affect the submitted job.

Results

LSF first checks the execution host to see if the input file exists, and if so uses this file as the input file for the job. Otherwise, LSF attempts to copy the file from the submission host to the execution host. For the file copy to be successful, you must allow remote copy (rcp) access, or you must submit the job from a server host where RES is running. The file is copied from the submission host to a temporary file in the directory specified by the JOB_SPOOL_DIR parameter in lsb.params, or your $HOME/.lsbatch directory on the execution host. LSF removes this file when the job completes.