12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

596 appendix d• If you are editing your .login file, enter as the last line in the file:set path = $path /usr/local/cluster/mpich-1.2.6/bin• Because dot files are read by the system when you first log on, you will haveto log off and back on for your changes to take effect. (Alternatively, you canuse the source command to avoid logging off and on.) Once you have loggedback on, check the values of the PATH environmental variable:> echo $PATH From Unix shell, tells you what Unix thinks• Let us now take a look at what is done to the computers to have them run asa Beowulf cluster. On Unix systems the “slash” directory / is the root or topdirectory. Change the directory to /> cd / Change to root directoryYou should see files there, such as the kernel and the devices, that arepart of the operating system. You should not modify these files, as thatcould cause real problems (it is the sort of thing that hackers and systemadministrators do).• MPI is a local addition to the operating system. We have MPI and the Sun GridEngine (SGE) in the /usr/local/cluster directory. Here the first / indicatesthe root directory and usr is the directory name under the root. Change thedirectory to /usr/local/cluster, or wherever MPI is kept on your system, andnotice the directories scripts and mpich-1.2.6 (or maybe just a link to mpich).Feel free to explore these directories. The directory scripts contains variousscripts designed to make running your MPI programs easier. (Scripts aresmall programs containing shell commands that are executed in order whenthe file is run.)• In the mpich-1.2.6 directory you will notice that there are examples in C, C++,and Fortran. Feel free to copy these to your home directory and try them:> cp -r examples /home/userid/mpiwhere userid is your name. We encourage you to try out the examples,although some may need modification to work on your local system.• Further documentation can be found in/usr/local/cluster/mpich-1.2.6/doc/mpichman-chp4.pdf/usr/local/cluster/sge/doc/SGE53AdminUserDoc.pdf/usr/local/cluster/sge/doc/SGE53Ref.pdfman qstatMPI documentationSGE documentationSGE referenceManual page on qstat• Copy the script run_mpi.sh from the Codes/MPIcodes directory on the CDto your personal mpi directory. This script contains the commands needed torun a program on the cluster.• Copy the file /usr/local/cluster/mpich/share/machines.solaris to yourhome directory and examine it. (The solaris extender is there because weare using the Solaris version of the Unix operating system on our Beowulf;you may need to change this for your local system.) This file contains a list−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 596

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!