NQS is a batch job system. It allows you to specify resources for your job (on STATS the only resources you can specify are the CPU time you need for your job and the memory your job needs). The resources for your NQS job are specified at the beginning of the job script. Then you put/write all commands into the script the same way as you would used them in a normal xterminal session. When that all is done and you have saved that file (its more ore less just a text file) you submit/send it to the NQS system. When the job is finished you will get log file (and if you want you can be notified per email). NQS can not be used with software/programs which needs interactive input from the user. This means for matlab that you have to create a file with all the commands you want to execute in matlab and 'feed' them to matlab. assume you have a file called 'x' and 'x' has two lines (matlab commands): ls quit To 'feed' this commands to matlab you would use the command matlab < x or if you want to redirect the screen output to a file OUTPUT matlab < x 1> OUTPUT A simple NQS job for matlab could look like: -------------------------- cut here ------------------------------------ # # Start of NQS Header # @$-lt 7:0:30 # maximum CPU time amount the job can use # # in hours:minutes:seconds. In our case our job # # will die if it needs more than 7 hours and 30 sec # # CPU time # # @$-lm 2000mb # Maximum memory amount the job can use. # # The maximum is 2000mb. If our job exceeds the # # memory limit we specified it will die. # # @$-r Matlab-1 # The name of the job. You can take any name up # # to 8 characters. This will allow you to identify your job # # among other jobs. The job output file name will have # # this name. # # @$-eo # stout (normal out put on the screen) and sterr (error # # messages on the screen) are piped to stdout. # # The job will create automatically one file of the form # # 'job-name.oxxx'. 'xxx' will be the job number and # # 'job-name' the name specified # # @$ # This statement is mandatory. It signals that no further # # NQS directives follow. # # # # Please note that the # are part of the command # # if you specify NQS resources! # # # End of NQS Header #=========================================================================== # From here you can insert your Unix commands as you would do in an interaktive # session (typing your commands at your terminal). # Comment lines start with a # and are ignored. # # # # The following lines are important to set the # correct environment variables # # source /etc/shinit/bashrc # # change into a sub directory within your home directory # cd $HOME/test # # # # Create the file with the matlab coomands we want to # use as input for Matlab # cat > matlabinput << EOF ls other matlab commands quit EOF # # Instead of doing this you can ofcourse use a file which you created # upfront in an editor. # # # # Run Matlab, all standard output (which would appear on the # screen) will be captured in the NQS logfile 'Matlab-1' # matlab < matlabinput # # # # We don't need the input file anymore so we delete it # rm -f matlabinput # # # # end of the batch job # exit -------------------------- cut here ------------------------------------ You can take this simple example as a template. The only thing you have to change is the specied CPU time in the NQS header, and if you wish the NQS job name. And of course you have to fill in the matlab commands you need.