Before you read this page, see my main MADCAP page for prerequisites.
I have tested this setup on a 4-processor Origin 200. This should also work for an Origin 2000 which has the same type of architecture.
The machine I tested this on was running IRIX 6.5.13m. It also has:
> showprods mpi > showprods scsl
Unpack mpiblacs.tgz and the patch
mpiblacs-patch03.tgz and move into the BLACS
directory:
> gzip -dc mpiblacs.tgz | tar -xvf - > gzip -dc mpiblacs-patch03.tgz | tar -xvf - > cd BLACS
Copy the Origin 2000 include file to the current directory:
> cp BMAKES/Bmake.MPI-O2K Bmake.inc
Edit Bmake.inc to reflect your setup. If you want to
use n32-bit libraries then change the following entries to:
F77NO_OPTFLAGS = -n32 CCFLAGS = -O2 -n32Otherwise, if you want to use 64-bit libraries change them to:
F77NO_OPTFLAGS = -64 CCFLAGS = -O2 -64If in doubt about this, ask your system manager. Alternatively, omit the
-n32 or -64 flag to use the system
default.
Make the libraries:
> make mpi
Copy the libraries to so that they are named something a bit more useful:
> cd LIB > cp blacs_MPI-IRIX64-0.a libblacsmpi.a > cp blacsCinit_MPI-IRIX64-0.a libcblacsmpi.a > cp blacsF77init_MPI-IRIX64-0.a libfblacsmpi.a
Move the libraries to a suitable library directory, hereinafter
referred to as LIBDIR (for example, use a subdirectory of
your home directory ~/lib):
> mkdir LIBDIR > mv *.a LIBDIR > cd ../..
Unpack Copy the IRIX64 include file to the current directory
scalapack.tgz and move into the
SCALAPACK directory:
> gzip -dc scalapack.tgz | tar -xvf -
> cd SCALAPACK
> cp INSTALL/SLmake.IRIX64 SLmake.inc
Edit SLmake.inc to reflect your setup. If you want
a n32-bit library the change the following line to:
NOOPT = -n32or for a 64-bit library change it to:
NOOPT = -64or omit the flag for the system default.
Make the library (meanwhile, go and have a cup of tea):
> make
Copy the library to LIBDIR:
> cp libscalapack.a LIBDIR
> cd ..
Make a directory for madcap and unpack the
madcap2.0.tar.gz in it:
> mkdir madcap > cd madcap > gzip -dc ../madcap2.0.tar.gz | tar -xvf -
Firstly compile madtool.c:
> cc -DO2K -c madtool.c
The .c files in the QUAD directory need a
bit of editing. In each, change the line
#include "madcap.h"to
#include "../madcap.h"
Next, change to both of the sub-directories MAP and
QUAD in turn, and compile each of the .c
files as follows. The MADCAP scripts expect the names of executables
to end in .x. For example, qq.c:
> cc -DO2K -c qq.c
> f77 -o qq.x qq.o ../madtool.o -LLIBDIR -lscalapack -lblacsmpi \
-lcblacsmpi -lblacsmpi -lscs -lmpi
Note that -lblacsmpi appears twice (for some mysterious
reason this is only needed by some of the programs). You may need to
add the -n32 or -64 flag to these lines as
you did in compiling MPIBLACS and SCALAPACK.
The script files MAP/map_bug,
MAP/map_bat, QUAD/quad_bug and
QUAD/quad_bat need some changes. Change the variables for
the directories so the scripts know the location of the MADCAP
programs and your data.
Change the line
setenv MADRUN "mpprun -n $NO_PE"to
setenv MADRUN "mpirun -np $NO_PE"Remember also to change the line
setenv NO_PE 25to reflect the number of processors you are going to use!