Required files (Please review doc)

To install POP-C++ and Alpine3D on your system you will need :

  • Sources of POP-C++
  • Sources of Alpine3D

To run a alpine3D test simulation you need to download :

  • input files of the simulation (e.g. zwischbergen or Dischma_Ref) and the setup directory

The sources of the programs and the configuration files are closely related : For example the syntax of the configuration files of Alpine3D may change in different versions of the code. For this reason it is safer if  you use the sources and input files that are grouped in the same directory altoghther.

You can find the last release of our sources here.

Installation of POP-C++

Requirements

POP-C++ does not have any specific dependancies. Only the following packages are needed :

  • g++
  • zlib-devel

Additional requirements :

  • Passwordless ssh access  between nodes
  • NFS shared file system between nodes (mandatory if POP-C++ is used on ARC : the home directory must be shared ! )

Environment :

The installation directory of POP-C++ must be specified the  POPC_LOCATION environment variable

POP-C++ needs to have the following directories added to the PATH environment variable :

  $POPC_LOCATION/bin
  $POPC_LOCATION/sbin

Installation

This describes the standard installation of POP-C++. A complete explanation can also be found on our wiki : http://gridgroup.hefr.ch/popc/doku.php/quick_start.

Fist you need the sources of POP-C++ (see above). Untar the files in your source directory and run the following commands to install :


cd popc-<version>
./configure --prefix=<installation directory>
make 
sudo make install

 

If you have a NFS file system you will need to install POP-C++ in a shared directory. If not the directories must have the same location.

The installation script will then ask different configuration questions. You can leave most of the field blank (press return).

Options to set :

During the configuration script (run by make install) you have the possibility to set the environment variables of POP-C++.

  • POPC_TEMP : place where POP-C++ stores its temporary files, can be set to the home directory (default /tmp)
  • POPC_DEBUG : if set to any value, POP-C++ is much more verbose (optional)
DO YOU WANT TO CONFIGURE POP-C++ SERVICES? (y/n)
y
...
DO YOU WANT TO MAKE A SIMPLE INSTALLATION ? (y/n) : 
n
...
SETTING UP RUNTIME ENVIRONMENT VARIABLES
Enter variable name:
<VAR>
Enter variable value:
<value>

(repeat if needed)

...
Do you want to generate the POP-C++ startup scripts? (y/n)
y
...

 

note :

  • if the install script asks if you want a simple installation, answer negatively.

 

Do not forget to add the two directories to your $PATH. E.g. if you use bash add this line to your  $HOME/.bashrc file.

 PATH=/home/lwinkler/inst/popc/bin/:/home/lwinkler/inst/popc/sbin/:$PATH

Installation of Alpine3D

Requirements

Dependancies

  • libc
  • libm
  • libstdc++
  • libgcc_s
  • libgfortran

environment

The path to the installation directory containing the "bin" sub-directory (which contains the executables) must be specified in $ALPINE3D_LOCATION.

E.g. if /usr/local/alpine3d/bin contains the alpine3D executables. Then you need to set ALPINE3D_LOCATION=/usr/local/alpine3d

Structure

Alpine3D is currently distributed as source code only. It also depends on a library that is alongside provided, MeteoIO. This library is statically linked to Alpine3D, which means that it does not need to be explicitely installed on the system for executing Alpine3D. However, this library builds plugins to give access to various data sources (inputs). These plugins are dynamically loadable libraries (standard .so libraries). They need to be installed in the bin/ directory along with the executable files.

Preparation

Unpack Alpine3D sources in your sources directory. It should already contain the sources of meteoio in a subdirectory of the same name. If it is not the case you need to copy it there or add a symbolic link. To prepare the installation use :

   cd meteoio
   ./autogen.sh
   ./configure
   cd ..
   make clean
Note :
  • With early versions of Alpine3D the configure command is not used.
  • In meteoio/Makefile.in it can happen that the ARCH = -march=pentium3 causes a compilation error if you compile for a different architecture. In this case, remove this parameter.
  • If the compilation crashes with the error "can not be used when making a shared object; recompile with -fPIC" edit meteoio/Makefile.in and set POPCC = popcc -fPIC .

Sequential installation

If you wish to edit the Makefile to fit your needs (most of the configuration is done on the very first lines of the Makefile). This Makefile is curently written for gcc/g++/gfortran and assumes that all required libraries have been properly declared in /etc/ld.so.conf (don't forget to refresh it with ldconfig).

The bin subdir will contain all the deployed binaries that are needed for Alpine3D including the dynamic libraries. If it does not exist, be sure to create it manually.

 

cd  <alpine3d-src>

make clean

make seq

mkdir bin
make deploy_seq

Parallel installation

To compile the parallel version you need the to have the latest version of POP-C++ installed on your system.

 

  make par
  mkdir deploy
  make deploy_par
 

Description of the generated files :

 
The content of the bin folder looks like this :
 
  1. Alpine3d.popc : the main executable
  2. *.module files : the parallel objects executables
  3. *.so libraries : dynamical libraries used at runtime
  4. object.map : the POP-C++ text file containing the path to the executable objects (note : if the path to the objects changes, this file must be edited. )

Running a Alpine3D simulation

  1. Untar the test case (e.g. zwischbergen) in a new directory. It contains the setup and input directory.
  2. Then inside this new directory you can either create a symbolic link named bin that links to your real bin directory or edit setup/run.sh so that the PROG_ROOTDIR variable contains the path to the real bin directory.
  3. Create an output and output/snowfiles directories.

Running Alpine3D in parallel without ARC

  1. Start the POP-C++ daemon with : SXXpopc start
  2. Edit run.sh to fit your simulation need
  3. Start run.sh (or alternatively run.std.sh
  SXXpopc start
  cd setup
  ./run.sh

run.sh is a startup script that creates the command to launches Alpine3D. This generated command should look pretty much like this :

popcrun ../bin/objectmap.conf ../bin/Alpine3D.popc --enable-eb --ebparam=../setup/EBParam.ini --snowparam=../setup/snowpack_param.ini
  --meteofields=2Dc --np-snowpack=4 --startdate=2008-10-01T01:00 --enddate=2009-01-31T23:00
Please note that you can use the --steps=... argument instead of enddate if you want to run a quick simulation. E.g. If a simulation with 22 steps stops after step 22 that means that your simulation is complete.
 
Note :
  • You can edit run.sh to decide if you want to run the parallel or the sequential version of Alpine3D or change the parameters.
  • The last parameter of the command is the number of steps in the simulation. For a quick similation keep it under 100.
  • The file "../deploy/Alpine3D.paroc" has been renamed to "../deploy/Alpine3D.popc" in the later versions. 
  • Similarely the deploy/ directory has been renamed to bin/ for coherence.
  • The job manager (SXXpopc) needs to be run only in case we execute Alpine3D without ARC.

 

 

 

Troubleshooting

If you get an "Out of ressource" error message

  1. Check that your objectmap.conf contains the path to your parallel objects.
  2. Edit <popc>/etc/jobmgr.conf and increase the value of jobs or reduce the number of workers in -np-snowpack=...

If you get an "JobCoreService: Fail to bind to the remote object broker" error message

  1. Check that job manager is launched (command : SXXpopc start)

Other problems :

  1. Check that the paths of objectmap.conf and Alpine3D.paroc are set correctly in the above command.

Running Alpine3D in parallel with ARC

You can find this documentation here.