IMa2p - bwHPC Wiki IMa2p - bwHPC Wiki

IMa2p

From bwHPC Wiki
Jump to: navigation, search
Description Content
module load bio/ima2p
Availability bwUniCluster
License GNU GENERAL PUBLIC LICENSE
Citing Sethuraman, A, J Hey. 2015. IMa2p - Parallel

MCMC and inference of ancient demography under the Isolation with
Migration (IM) model. Molecular Ecology Resources
DOI: 10.1111/1755-0998.12437

Links IMa2p on Githup-Repository | Readme, Installation Instructions, How-To's
Graphical Interface No

1 Description

IMa2p is a parallel implementation of IMa2, using OpenMPI-C++ - a Bayesian MCMC based method for inferring population demography under the IM (Isolation with Migration) model dx.doi.org.
More information about IMa2p

2 Versions and Availability

A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the

Cluster Information System CIS

Show a list of available versions using 'module avail bio/ima2p' on the bwUniCluster.

$ module avail bio/ima2p
--------------- /opt/bwhpc/common/modulefiles -----------
bio/ima2p/1.0


3 Usage

3.1 Loading the module

You can load the default version of IMa2p with the command 'module avail bio/ima2p'.

$ module avail bio/ima2p
----------------- /opt/bwhpc/common/modulefiles ---------------
bio/ima2p/1.0
$ module load bio/ima2p
$ module list
Currently Loaded Modulefiles:
  1) compiler/gnu/4.9          3) bio/ima2p/1.0
  2) mpi/openmpi/1.8-gnu-4.9

The module will try to load modules it needs to function (e.g. compiler/MPI...).
If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Ima2p.
If you wish to load a specific (older) version, you can do so using e.g. 'module load bio/ima2p/version' to load the version you desires. At the time of this document was created, only one version was available.

3.2 Program Binaries

Show the location and contents of the installed binaries in the main folder of the software and show some informations, too.
After loading the Ima2p module ('module load bio/ima2p') its path is also set to the local $PATH- and the $IMA2P_BIN_DIR environment will be created.

$ ls -F $IMA2P_BIN_DIR
ima2p*  IMa2p*

The executable is called IMa2p and is located in the /opt/bwhpc/common/bio/ima2p/1.0/bin folder (ima2p and IMa2p are identically).

  • To run the program in serial mode (single processor), run the executable directly with an appropriate command line.
  • To run it in parallel use mpirun or mpiexec, for example: mpirun -np IMa2p ...
  • An IMa2p run must invoke at least 1 MCMC chain per run. In IMa2 the –hn flag is used to indicated the total number of chains. In IMa2p the –hn flag is used to indicate the number of chains per processor. For example, to invoke Metropolis coupling using a total of 10 chains, distributed among 5 processors: mpirun -np 5 IMa2p -hn 2

3.3 Disk Usage / Workspaces

Change to your local $TMP-directory or to "your local workspace" before starting your calculations.
'ima2p_repo' is an example name of a repository you created by using the command 'ws_allocate'.

$ cd $(ws_find ima2p_repo)
$ pwd
/workspace/scratch/...-ima2p_repo-0


4 Moab Submit Examples

4.1 bwHPC examples

You can copy a simple interactive example to your workspace and run it, using 'msub'

$ cd $(ws_find ima2p_repo)
$ cp $IMA2P_EXA_DIR/bwhpc-ima2p-example.moab .
$ cp bwhpc-ima2p-example.moab myima2pjob.moab 
§ vi myima2pjob.moab         # do your own modifications
$ msub myima2pjob.moab       # start job submission

It is strongly recommended to use $IMA2P_EXA_DIR to find the bwHPC examples.

4.1.1 bwHPC Moab submit script

Here is an excerpt from the supplied bwhpc-ima2p-example.moab script as found in $IMA2P_EXA_DIR.

[...]
#MSUB -N ima2p_job
#MSUB -j oe
#MSUB -o $(JOBNAME).$(JOBID)
#MSUB -m ae
#MSUB -l nodes=1:ppn=2
#MSUB -l mem=10000mb
#MSUB -l walltime=00:05:00
[...]
echo " "
echo "### Copying input test files for job (if required):"
echo " "
echo "Working Directory:                    $PWD"
echo "Running on host                       $HOSTNAME"
echo "Job id:                               $MOAB_JOBID"
echo "Job name:                             $MOAB_JOBNAME"
echo "Number of nodes allocated to job:     $MOAB_NODECOUNT"
echo "Number of cores allocated to job:     $MOAB_PROCCOUNT"
cp -Rv ${IMA2P_EXA_DIR}/OWNWinfile-own .

echo " "
echo "### Calling ima2p command ..."
echo " "
mpirun -np ${MOAB_PROCCOUNT} IMa2p -iOWNWinfile-own -otrial-own.out -q100 \
 -m0.34 -t23.448 -s233 -b100 -r25 -hfg -ha0.975 -hb0.75 -l100 -p36 \
 -y1 > ima2p.stdout 2> ima2p.error
[...]


5 IMa2p-Specific Environments

To see a list of all Ima2p environments set by the 'module load'-command use 'env | grep IMA2P' or the command 'module display bio/ima2p'.

$ module list
Currently Loaded Modulefiles:
  1) compiler/gnu/4.9          3) bio/ima2p/1.0
  2) mpi/openmpi/1.8-gnu-4.9
$ 
$ env | grep IMA2P
IMA2P_PSEUDO=/opt/bwhpc/common/bio/ima2p/1.0/pseudo/
IMA2P_EXA_DIR=/opt/bwhpc/common/bio/ima2p/1.0/bwhpc-examples
IMA2P_TMPDIR=/opt/bwhpc/common/bio/ima2p/1.0/tmp/
IMA2P_HOME=/opt/bwhpc/common/bio/ima2p/1.0
IMA2P_VERSION=1.0
IMA2P_BIN_DIR=/opt/bwhpc/common/bio/ima2p/1.0/bin


6 Version-Specific Information

For a more detailed information specific to a specific Ima2p version, see the information available via the module system with the command 'module help bio/ima2p'.
For a small abstract what Ima2p is about use the command 'module whatis bio/ima2p'.

$ : ------------------------ HELP -----------------------
$ module help bio/ima2p
----------- Module Specific Help for 'bio/ima2p/1.0' --------------
  Ma2p is a parallel implementation of IMa2, using OpenMPI-C++ - a Bayesian MCMC based 
  method for inferring population demography under the IM (Isolation with Migration) 
  model. Please refer to Sethuraman and Hey (2015) for details of implementation.
[...]
 Documentation:
  *  Get started:
     https://github.com/arunsethuraman/ima2p/blob/master/IMa2p%20manual.pdf
  *  Manuals (for IMa2 only):
     https://bio.cst.temple.edu/~hey/program_files/IMa2/Using_IMa2_8_24_2011.pdf
     https://bio.cst.temple.edu/~hey/program_files/IM/Introduction_to_IM_and_IMa_3_5_2007.pdf
  *  IMa2p siumlation-data can be found here:
     /opt/bwhpc/common/bio/ima2p/1.0/Simulations
  *  bwHPC examples and a moab example script can be found here:
     /opt/bwhpc/common/bio/ima2p/1.0/bwhpc-examples 
[...]
$ : ------------------------ WHATIS --------------------
$ module whatis bio/ima2p
bio/ima2p            : IMa2p is a parallel implementation of IMa2, using 
          OpenMPI-C++ - a Bayesian MCMC based method for inferring
          population demography under the IM (Isolation with Migration)
          model. Command: 'IMa2p'


7 Related Webpages

----