SCASH Omni/OpenMP Getting Started

This document describes, The following example assumes a user environment setting described in Getting Started in the SCore User's Guide.

A simple OpenMP/C LAPLACE program on SCASH

Compilation

The compilation of an OpenMP/C program is as easy as an C compilation. An example of a LAPLACE program can be found in /opt/score/example/scash/laplace.omp/laplace_omp.c, /opt/score/example/scash/laplace.omp/second.c. Copy the program and the include file /opt/score/example/scash/laplace.omp/laplace.h to your work directory. Make sure the program is saved as laplace_omp.c, since the Omni OpenMP/C compiler only accepts source files suffixed with .c. Compile the program as follows:

$ omcc -omniconfig=scash -o laplace_omp laplace_omp.c second.c -lm
$

Just as a normal C compiler, the Omni OpenMP/C compiler omcc produces an executable file, named laplace_omp. The Omni OpenMP/C compiler accepts most of the compiler options that the C compiler accepts.

Running a program on a cluster

You may invoke the Compute Host Lock Client, msgb(1), as follows to find some free hosts in the cluster:

$ msgb -group pcc &

pcc is a group defined in the SCore cluster database, scorehosts.db(5). Invoke the scout program with the same group name on which to run your program:

$ scout -g pcc
SCOUT: Spawn done.   
SCOUT: session started
$
A new shell process is now created as a child of the scout program. If msgb is running, some or all hosts in the msgb window will turn red when the remote processes are invoked with scout. Note that the host which the scout program is invoked doesn't have to be one of the hosts of your cluster.

Eventually you can invoke the program:

$ scrun -nodes=2x1,network=myrinet ./laplace_mpc
SCORE: connected (jid=100)
<0:0> SCORE: 2 nodes (2x1) ready.

...

$
You can find other SCASH examples under the /opt/score/example/scash directory.

See also

SCore Cluster Software System Reference Guide
Omni OpenMP Compiler
Omni OpenMP/C Compiler omcc
Omni OpenMP/F77 Compiler omf77
SCASH C Getting Started


$Id: getting-started_omp.html,v 1.3 2004/05/12 03:34:47 kameyama Exp $