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++
POP-C++ does not have any specific dependancies. Only the following packages are needed :
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 ! )
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 :
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:
Enter variable value:
<value> (repeat if needed) ... Do you want to generate the POP-C++ startup scripts? (y/n) y ...
- 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.
Installation of Alpine3D
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
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.
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 :
./autogen.sh ./configure cd .. make clean
- 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 .
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.
To compile the parallel version you need the to have the latest version of POP-C++ installed on your system.
Description of the generated files :
- Alpine3d.popc : the main executable
- *.module files : the parallel objects executables
- *.so libraries : dynamical libraries used at runtime
- 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
- Untar the test case (e.g. zwischbergen) in a new directory. It contains the setup and input directory.
- 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.
- Create an output and output/snowfiles directories.
Running Alpine3D in parallel without ARC
- Start the POP-C++ daemon with : SXXpopc start
- Edit run.sh to fit your simulation need
- 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
- 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.
If you get an "Out of ressource" error message
- Check that your objectmap.conf contains the path to your parallel objects.
- 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
- Check that job manager is launched (command : SXXpopc start)
Other problems :
- 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.