NCSA Home
Contact Us | Intranet | Search

MSS and Batch Jobs


How can I access MSS from a batch script?

    On NCSA production machines, the msscmd utility is available to access MSS from a batch script. The syntax of the command is:

     msscmd ftp_commands 
    

    where ftp_commands is either an ftp command (e.g., ls, put, get, mkdir) or a list of ftp commands separated by commas. Some examples:

    • msscmd cd cfdjob, get file3
    • msscmd "cd cfdjob, mget file*"
    • msscmd mkdir job25, cd job25, put job25.tar

    Be sure to include quotes when using wildcards.

Is there a sample batch script with MSS commands?

    Sample batch scripts are available on NCSA HPC machines in the following locations:
    • /usr/local/doc/batch_scripts (abe)
    • /usr/local/doc/pbs/samples (cobalt)
    • /usr/local/doc/pbs/mpi.pbs (mercury)

The sample batch script assumes that files are already on MSS. How do I move my files there?

    Prior to the job running, you'll need to move the files to MSS. You can use mssftp to do it interactively. Or you can use msscmd commands to create the directory and move the files there. For example, go to the directory that contains the files, then:
       msscmd "mkdir testdir"
    
       msscmd "cd testdir, put myexe"
       or 
       msscmd "cd testdir, mput *"  
    
    See the online documentation for more information.

I'm running a very small program that is already in my home directory. How do I change the sample batch script to use it?

    Here are the lines to change:
    • Remove the msscmd get line and the chmod line.
    • Replace them with a standard cp command, like:
            cp ~/testdir/myexe .
            
    • Don't forget to copy any output files at the end of the job as well. They'll need to be copied from the scratch directory to MSS or your home directory (assuming they fit within your home directory quota).

My standard output and standard error files are not on MSS. Where are they?

    The standard output and standard error from the batch job should be in the directory from which you submitted the job. So, an msscmd command from the scratch directory like:
      msscmd "cd test1, mput *.dat testjob.out testjob.err"  
    
    will not find testjob.out and testjob.err in that directory. In the case of PBS, those files won't appear until after the job is done. So, if you want to have those files on MSS, manually copy them after the job is done.

I'm having trouble with the msscmd commands in my batch script. How do I figure out what's happening?

    Here are some things to try:
    • You can run the msscmd commands interactively in a scratch directory.
    • You can add "ls -l" statements after msscmd get commands or before the msscmd put commands so you can see what's in the directory.