[MITgcm-support] size.h

Ed Hill ed at eh3.com
Wed Apr 7 21:10:57 EDT 2004


On Wed, 2004-04-07 at 18:55, Michael Schaferkotter wrote:
> greetings:
> i/ve successfully run the plume on the shelf problem and i want to modify the example.
> 
> looking in SIZE.h i see that:
> 
>      &           sNx = 160,
>      &           sNy =   1,
>      &           nSx =   2,
>      &           nSy =   1,
>      &           nPx =   1,
>      &           nPy =   1,
>      &           Nx  = sNx*nSx*nPx,
>      &           Ny  = sNy*nSy*nPy,
>      &           Nr  =  60)
> 
> the domain is 320x1x60.
> 
> why is nSx set to 2, i/m using a single processor (i think). there was nothing in the make that i could
> see indicated multi-processor.

Hi Michael,

Almost all of the verification examples currently have multiple tiles so
that they will give the same (or almost the same) results whether they
are run on single or multi-processor systems.  If you look in:

  http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/verification/

you will also see that most tests come with both "code/SIZE.h" and
"code/SIZE.h_mpi" files.  They are used by the verification/testreport
script to do daily MPI verification runs:

  http://mitgcm.org/testing.html


> also, i couldn/t find the info on the web site about parallel setup. i have access to a bunch of machines and would
> like to try an MPI run.


I just looked through the docs and you're right--we should add more
detail about how to use MPI.  In the mean time, heres the "quick"
directions:

  1) Determine the locations of your MPI compiler and/or libraries 
     and put them into an options file ("optfile").  It will be 
     easiest to start with one of the examples in:

http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/tools/build_options/

     such as "linux_ia32_g77+mpi_cg01" or "linux_ia64_efc+mpi" and 
     then edit it to suite your machine.  You may need help from 
     your local systems admin to determine the location of the MPI 
     libraries or, if necessary, to have them installed.


  2) Build the code with the genmake2 "-mpi" command such as:

     ../../../tools/genmake2 -mods=../code -mpi -of=YOUR_OPTFILE
     make depend
     make


  3) Run the code with the MPI "loader" or "run" program provided
     with your particular implementation of MPI.  Typical MPI 
     packages such as mpich will use something like:

     mpirun -np 4 -machinefile mf ./mitgcmuv


And thats it.  If you have more specific problems please send them to
this list and we'll try to help.

Ed

ps - Attached are the commands used recently to install MPICH
  and build and run MITgcm on a fairly standard (if there is 
  such a thing!) Linux cluster.


-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Room 54-1424;  77 Massachusetts Ave.
            Cambridge, MA 02139-4307
email:   eh3 at mit.edu,  ed at eh3.com
URL:     http://web.mit.edu/eh3/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------


1) get/install mpich:

  wget http://www-unix.mcs.anl.gov/mpi/mpich/downloads/mpich.tar.gz
  tar -xzf mpich.tar.gz 
  cd mpich-1.2.5.2/
  export RSHCOMMAND=/usr/bin/ssh
  ./configure -prefix=/home/ehill/mpich
  make
  make install
  cp /usr/local/mpich-1.2.5/share/machines.LINUX  \
    /home/ehill/mpich/share/machines.LINUX

2) get and build MITgcm:

  export CVSROOT=':pserver:cvsanon at mitgcm.org:/u/gcmpack'
  cvs login 
    <== "cvsanon"
  cvs co MITgcm
  cd MITgcm/verification/global_ocean.cs32x15/build
    *** NOTE: PLEASE SEE ATTACHED OPTFILE "linux_amd64_g77+mpi" ***
  cp ~/linux_amd64_g77+mpi .
  mv ../code/SIZE.h_mpi ../code/SIZE.h
  ../../../tools/genmake2 -mpi -ieee -of=./linux_amd64_g77+mpi  \
    -mods=../code
  make depend
  make

3) run MITgcm:

  MITgcm/verification/global_ocean.cs32x15/input
  ln -s ../build/mitgcmuv .
  /home/ehill/mpich/bin/mpirun -nolocal -np 2 ./mitgcmuv


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20040407/2fa7b6fc/attachment.sig>


More information about the MITgcm-support mailing list