Origin FAQ

From Hpc

Jump to: navigation, search


This is a list of some of the questions we have received on the use of the SGI Origin 3800. We have also included som questions of a more general nature, in the hope that it will be sufficient to look up one FAQ list only.

Contents


General questions

Where to get help

If it is urgent you may contact the support staff by phone at 73 59 06 50. Otherwise you are strongly encouraged to use the NOTUR support support-ntnu@notur.no. Please tell which machine you are running on, what command(s) you typed and cut & paste any error messages relevant to the problem.

How to login ?

The only way to connect to gridur.ntnu.no is by secure shell (ssh). Hence telnet, ftp and the r-commands (rsh/rlogin) do not work. Windows users: For logging in from MS Windows machines, we recommend using the Putty ssh client or similar.

How do I set up passwordless access to the machine ?

An example copied from San Diego Supercomputer Center.

How can I change my login shell ?

You nedd to contact support-ntnu@notur.no.

How to transfer files ?

Use scp (works in both directions) with option -c blowfish (currently only scp protocol 1, scp1, is supported), or outward ftp from gridur. We recommend using the WinSCP program for copying files to/from windows machines.

How can I find information about the current load on the machine ?

Use the bqueues and status commands. System utilization is provided by NOTUR Palantir.

How can I check how much I have left of my computing quota ?

Enter the cost command.

How do I switch between projects for charging purposes ?

Use command newproj to charge all interactive work within a login session to a different project than default. To charge batch jobs to a specific project other than default, use the #BSUB -P projectname option in your batch script. Remember to use small letters for the project name.

Where to locate developer manuals ?

See the web at SGI techpubs.


Program development

How do I compile a Fortran program ?

A good starting point is

f77 -64 -mips4 myprog.f
f90 -64 -mips4 myprog.f90

Fortran programmers are adviced to use the f90 compiler.

How do I compile a C or C++ program ?

cc -64 -mips4 myprog.c
CC -64 -mips4 myprog.C

If using the new standard C++ library, which has new header names, you have to include the -LANG:std option on the command line, i.e.

CC -64 -mips4 -LANG:std myprog.C

How do I compile multi-language programs ?

When your application has two or more source programs written in different languages, you should compile each program module separately with the appropriate compiler and then link them together in a separate step. You create objects suitable for linking by specifying the -c option. When linking you should use the compiler command corresponding to whatever language the main module is written in. You must explicitly specify the link libraries for the other languages with the -l option. For example,

cc -c main.c 
f90 -c module.f90
cc -o myprog main.o module.o -lfortran

The Fortran compiler changes the name of a procedure from the way you may have written it by converting to all lowercase letters and extending with a final underscore (_) character when placing the name in the object file it generates. When you call a Fortran subprogram from a C procedure you must spell the name in this translated way. For example, the following Fortran declaration

SUBROUTINE MATRIX()

must be declared in a C function as follows

extern int matrix_()

Conversely, to call a C function from a Fortran program, ensure that the C function's name is spelled the way the Fortran compiler expects it to be. For example, an integer C function declared in a Fortran program as follows

external MULT

must be defined in the C module as

int mult_() {...}

How do I compile and link MPI programs ?

Directories to be searched are set in the mpt module which is loaded by default when you login to the machine. But you have to specify the mpi-library, i.e.

f77 code.f -lmpi
f90 code.f90 -lmpi
cc code.c -lmpi

Linking C++ programs, it is recommended that you include the mpi++ library, i.e.

CC code.C -lmpi++ -lmpi

If you wish to use the MPI C bindings in C++ programs (i.e. use the C-style function calls in an otherwise object-oriented code), it is recommended that you define the macro MPI_NO_CPPBIND before including mpi.h in your code.

How do I optimize my program ?

A good starting point is to include the -O2 option, e.g. compiling a Fortran 90 code

f90 -O2 code.f90

You should identify the program modules that consume a significant fraction of the program's run time and compile them with the highest level of optimization. This may be specified with either -O3 or -Ofast=ip35

What analysis tools are available for profiling codes?

SpeedShop is an integrated package of performance tools that run experiments on executables and lets you examine the results. Experiments are recorded using the ssrun command and report generation is done through the prof command. An example finding the amount of CPU time spent in each routine in your program

ssrun -usertime my_prog

The file generated, my_prog.usertime.m99999, may be analyzed with prof

prof my_prog.usertime.m99999 >usertime.output

The file usertime.output contains the formatted output of the experiment. For more information and examples see man pages and the SpeedShop User's Guide.


Batch jobs

How do I submit my job to the LSF batch system ?

Refer to the batch job submission guide.

How can I follow the status of a running batch job ?

Use the commands bjobs and status.

Is there any way to view lsbatch stdout/stderr while the job is running ?

Use the command bpeek on the machine your job is executing.

How do I kill a running batch job ?

Use the command bkill. See the man page for details.

How do I run an OpenMP batch job ?

Specify the number of threads to use during execution by setting the environment variable OMP_NUM_THREADS. Make sure that this agrees with the number of processors requested from LSF. For example, running your job on 4 processors put

#BSUB -n 4
export OMP_NUM_THREADS=4   # Bourne shell, use setenv with tcsh

in your jobs cript.

Errors

Why am I beeing logged off with a message "Received disconnect from 129.241.21.171: 2: Idletimeout." ?

You have been logged off for being idle for more than 12 hours.

Why do I get an error message working interactively saying: "Cputime limit exceeded" ?

You have exceeded the login session interactive time limit of 60 cpu-minutes. After this you will not be able to do anything useful in this login shell and you will get a message

fork: Resource temporarily unavailable

You must logout and log back in again. Usage and limits might be viewed by typing jstat -l.

Where can I find a list of error codes ?

Enter man 2 intro.

Where can I find a list of signals ?

Enter man 5 signal.

Is there an explanation for exit codes from lsbatch ?

The lsbatch daemon uses regular Unix signals/error codes that come from whatever process was running at the time in your batch job i.e., the last process. For exit codes >128, subtract 128 to get the number. Check man 5 signal for signal numbers and man 2 intro for system error numbers. Since lsbatch just gives an exit code (and doesn't specify whether it's coming from a signal or an error), you'll need to look at both to check which one fits.

Why don't I get any core file when my program crashes ?

The default policy is to disable core file dumps by setting core file size to 0 (zero) in users shell startup files (.cshrc or .bashrc). If you need to investigate core files you might increase or remove this limit. If you do so we expect you know what you are doing. Large MPI applications dumping core to the home directory is an example of not knowing what you are doing.

How do I trap floating point exceptions ?

By default the conditions overflow, underflow, divide-by-zero, inexact result, invalid operand (e.g.infinity), do not cause a floating point exception (fpe) in the MIPSpro compilers. A default value is substituted and the program continues running. This is usually not the desired behavior. To circumvent this behavior compile your code as follows

f90 -TARG:exc_min=OZV code.f90

Another way to catch fpe's is by setting the environment variable TRAP_FPE:

export TRAP_FPE='OVERFL=ABORT;DIVZERO=ABORT;INVALID=ABORT'    # Bourne shell

Then link your code with library fpe:

f90 code.f90 -lfpe

See man handle_sigfpes for more information.

Why does my program runs interactive but fail in batch with: "...Memory fault (coredump)" ?

This problem may be caused by a too high stacklimit in the queue you are running your job. Try submitting with a smaller stacklimit, e.g.

#BSUB -S 500000

Why does my batch job fail with a message like: ".../work/1005124261.128120.shell: not found" ?

Did you transfer your jobscript from a DOS/Windows system to gridur ? If so every line has probably gained an extra ^M (control-m) character at the end. Check your jobscript with the command cat -v to see if this is the case. Remove the unwanted characters with command to_unix,

to_unix jobscript.dos jobscript
Personal tools