The compilation of an SCASH program is as easy as an MPC++
compilation. An example of a LAPLACE program can be found in
/opt/score/example/scash/laplace.mpc/laplace_mpc.cc.
Copy the program and the include file
/opt/score/example/scash/laplace.mpc/laplace.h to your work
directory. Make sure the program is
saved as laplace_mpc.cc, since the MPC++ compiler only
accepts source files suffixed with .cc. Compile the program
as follows:
$ mpc++ -scash -o laplace_mpc laplace_mpc.cc $
Just as a normal C/C++ compiler, the MPC++ compiler produces an
executable file, named laplace_mpc. The MPC++ compiler
accepts most of the compiler options that the C/C++ compiler accepts.
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=4x2,network=myrinet ./laplace_mpc SCORE: connected (jid=100) <0:0> SCORE: 8 nodes (4x2) ready. ... $You can find other SCASH examples under the
/opt/score/example/scash directory.