========================================================================= File: NQS1.txt Last modified: 7/12-97 ------------------------------------------------------------------------- The following is a sample NQS script written by Jacques Richer. It is written for a particular user (subramah). It is relatively simple because it assumes that the user has first created a temporary directory /UDEM/Scratch/tmp/subramah 1) where the executable and input files are copied, 2) the job will be run, 3) and that the user will clean up this temporary directory once the job is done, saving any important files to another location. ========================================================================= #! /bin/ksh # # The following is a commented skeleton script for running jobs under NQS # It is NOT a minimal script. A minimal script could have absolutely # no QSUB options set here, and everything set on the command line # at submission time, or it could set just the queue name. NQS options # must be set first, then your normal script follows, in the SHELL language # you asked for (see below). # # All the options mentioned here can also be set directly on the # qsub command line at submission. Options given on # the command line override corresponding options set in the script file. # # Type 'man qsub' for an exhaustive list of options. # # The following lines are examples of the most frequently used options # # NB: Type a '@' in front of the '$' to ACTIVATE an option. "# $" lines are # just treated as comments. # # - The next option sets a start time for the job # $-a"23:00:00" # or: # $-a"tomorrow 01:00:00" # # - The next option specifies where error messages (stderr) should be saved: # NB: By default, the system uses a different (unique) name for each job, # and writes it in your home directory. # @$-e /UDEM/Scratch/tmp/subramah/WHATEVER.NQS.ERR # # - The next option specifies where standard output (stdout) should be saved: # NB: By default, the system uses a different (unique) name for each job, # and writes it in your home directory. # @$-o /UDEM/Scratch/tmp/subramah/WHATEVER.NQS.OUT # # - The next option requires that a Email be sent to you when the job completes # (successfully or not) # @$-me # # - The next option specifies which queue the job must be submitted to. # HPCNET USERS HAVE NO CHOICE HERE; they should always use "schubert_hpcnet" # This can be set in various ways: # [1] On the command line as "-q schubert_hpcnet" # [2] via an environment variable called 'QSUB_QUEUE' # [3] here (simplest!), with the following option # @$-q schubert_hpcnet # # **** The next two options are essential to a good functionning of the system : # Since your HOME is normally mounted via NFS, there is no need to ask # for your stdout/stderr files to be shipped to another machine. # @$-ke # @$-ko # # - The next option asks NQS to export all environment variables # @$-x # # - The next option specifies which SHELL you want to work with # @$-s /bin/ksh # # - The next option gives a name to your request (the name that will appear in # the "qstat" report); spaces are allowed within quotes. # @$-r 'ZEVOL_model_N' # # .............................................. # # The actuall script must follow here. You must not refer to your files # with absolute paths. Use names like ~subramah (for subramah's home # directory, or ${HOME}, or whatever name the shell supports). Use # paths like /UDEM/Scratch/tmp or /UDEM/group/hpcnet/subramah/... # (for user subramah) for access to temporary files in either of these spaces. # # By default, the script starts executing wherever your login shell leaves you # after a new login (usually your home directory). So the first command is # often a 'cd' command. echo "SHELL=${SHELL}" PATH="${PATH}:/usr/bsd/:/usr/sbin/:${HOME}/bin" WORKDIR=/UDEM/Scratch/tmp/subramah/weakscreening CODE=/UDEM/Scratch/tmp/subramah/program cd $WORKDIR # ... etc...