Changes between Version 37 and Version 38 of AnugaParallel


Ignore:
Timestamp:
Mar 12, 2015, 2:44:52 PM (10 years ago)
Author:
steve
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AnugaParallel

    v37 v38  
    11== INSTALLING anuga_parallel ==
    22
    3 === Note ===
    4 
    5 We use  {{{******}}} to represent the name of your home directory. So when running the commands below always replace {{{******}}} with the name of your home directory.
    6 
    7 === Install anuga ===
    8 
    9 First you should install the most uptodate version of the code. Follow the [InstallUbuntuSvn instructions] to install anuga on Ubuntu. By following  those instructions you should end up with a download of the anuga_core code (which contains the sequential code (in the source/anuga directory) and the anuga_parallel code (in source/anuga_parallel)).
    10 
    11 You should end up with a directory
    12 {{{
    13 /home/******/anuga_core
    14 }}}
    15 
    16 
    17 Make sure you have setup your PYTHONPATH to point to the anuga source directory
    18 
    19 For instance I have the following line in my .bashrc file
    20 
    21 {{{
    22 export PYTHONPATH=/home/******/anuga_core/source
    23 }}}
    24 
    25 At this stage you should have a working version of the sequential anuga program. I.e. you should be able to run command
    26 {{{
    27 python test_all.py
    28 }}}
    29 from the anuga_core directory and have your installation pass all the unit tests (well nearly all, as this is the development version and there are sometimes a few minor unit tests that fail).
     3
     4If you installed {{{anuga}}} and with the {{{ANUGA_PARALLEL}}} environment set via
     5
     6{{{
     7export ANUGA_PARALLEL="mpich2"
     8}}}
     9
     10or
     11{{{
     12export ANUGA_PARALLEL="openmpi"
     13}}}
     14
     15then you should already have parallel support.
     16
     17
     18== Setting up parallel support ==
     19
     20Let's suppose that you initially only set up {{{anuga}}} to run in sequential mode. Then to setup parallel mode you will need to install an {{{MPI}}} environment (mpich2 or openmpi) and the python wrapper {{{pypar}}}.
     21
     22We will assume you have install {{{anuga}}} from source and the source is in the directory {{{anuga_core}}}
    3023
    3124
     
    4134
    4235{{{
    43 python compile_all.py
    44 python test_all.py
     36sudo python setup.py install
     37python runtests.py
    4538}}}
    4639
     
    5043=== Install anuga_parallel ===
    5144
    52 Now to get anuga_parallel to work, we need to install some other packages first, in particular {{{MPI}}} for the parallel message passing and {{{pypar}}} a simple python wrapper of {{{MPI}}}.
     45Now to get parallel version of {{{anuga}} to work, we need to install some other packages first, in particular {{{MPI}}} for the parallel message passing and {{{pypar}}} a simple python wrapper of {{{MPI}}}.
    5346
    5447==== MPI ====
     
    7265
    7366==== pypar ====
    74 
    75 
    7667
    7768We use pypar as the interface between mpi and python. The most recent version of PYPAR is available from
     
    8677}}}
    8778
    88 This produces a directory
    89 {{{
    90 /home/******/pypar
    91 }}}
    92 
    93 Change to the {{{/home/******/pypar/source}}} directory, and then run the command
     79This produces a directory {{{pypar}}}
     80
     81Change to that directory, and then run the command
    9482
    9583{{{
     
    117105==== Compile {{{anuga_parallel}}} code ====
    118106
    119 In the anuga_parallel directory there are two subdirectories {{{pymetis}}} and {{{pypar_extras}}}
    120 which contain files that need compiling. The easiest way to do this is to return to the {{{anuga_core}}} directory
    121 and run the {{{compile_parallel_all.py}}} script.
    122 
    123 I.e. run the following two commands
    124 
    125 {{{
    126 cd /home/******/anuga_core/
    127 python compile_parallel_all.py
    128 }}}
     107Actually the parallel code is already in the {{{anuga_core}}} directory. We just need to reinstall {{{anuga}}}.
     108
     109From the {{{anuga_core}}} directory force a rebuild and reinstall  of {{{anuga}}} via
     110
     111{{{
     112sudo python setup.py build -f
     113sudo python setup.py install
     114}}}
    129115
    130116
     
    132118=== Running anuga_parallel  ===
    133119
    134 You should now be ready to run some parallel anuga code. Go back to the anuga_parallel directory and run the tests
    135 
    136 {{{
    137 cd /home/******/anuga_core/source/anuga_parallel
    138 python test_all.py
    139 }}}
    140 
    141 Hopefully that all works. There will be some output which are warning messages generated by the unit tests
    142 checking out various error situations.
     120You should now be ready to run some parallel anuga code.
     121
     122{{{
     123python runtests.py
     124}}}
     125
     126Hopefully that all works. If you are observant you should see that the number of unittests has increased by about 30, those are the parallel tests.
    143127
    144128==== Example program ====
    145129
     130From the {{{anuga_core/examples/parallel}}} directory:
    146131Run run_parallel_sw_merimbula.py
    147132