# Install Two methods are available for this software install, form [sources](#sources-install) or a [container images](#container-install). The softwares are already available for LEGOS colleagues on [summit2](#summit2). (sources-install)= ## From sources **WARNING:** *the instalation from source can be very long due to library conflict, unlinked library path, etc. and may require adaptation to your own system. So if you are not confortable with source building on UNIX, please go directly to [container images installation](#container-install).* The sources are available on the IN2P3 GitLab and you will need to download the three following directories: - poc-solvers: - tools: - pocvip: To better control on your install, we recommande to install all the dependencies on a specific directory *local* ```bash ncpu=6 #the number of available CPUs to speedup the compilation INSTALL_PATH=$PWD #where poc-solvers, tools and pocvip directory are LOCAL_INSTALL_PATH=$PWD/local mkdir $LOCAL_INSTALL_PATH for dir in lib include bin ubin do mkdir $LOCAL_INSTALL_PATH/$dir done export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LOCAL_INSTALL_PATH/lib export CMAKE_LIBRARY_PATH=$LD_LIBRARY_PATH export CMAKE_INCLUDE_PATH=$LOCAL_INSTALL_PATH/include ``` The poc-solvers will need several dependencies to be installed in *local* (comment the one you already have): ```bash #Download the poc-solver librairies wget http://www.netlib.org/blas/blas.tgz wget http://www.netlib.org/lapack/lapack-3.5.0.tgz wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.3.tar.gz wget https://download.open-mpi.org/release/hwloc/v2.5/hwloc-2.5.0.tar.bz2 # Unfold the librairies sources tar -xf blas.tgz tar -xf lapack-3.5.0.tgz tar -xf scalapack-2.0.2.tgz tar -xf SuiteSparse-4.4.3.tar.gz tar -xf hwloc-2.5.0.tar.bz2 ### COMPILATION # BLAS cd BLAS-3.12.0 make cp -v *.a $LOCAL_INSTALL_PATH/lib/libblas.a cd .. # LAPACK cd lapack-3.5.0 sed -re "s|= (-O)|= -g \1|;s|-O2|-O3|;\ s|^( *BLASLIB *= *).*|\1$LOCAL_INSTALL_PATH/lib/libblas.a|" make.inc.example >make.inc make make lapackelib cp -v liblapack.a $LOCAL_INSTALL_PATH/lib cd .. # SCALAPACK cd scalapack-2.0.2 sed -re "s|= (-O)|= -g \1|" SLmake.inc.example >SLmake.inc make cp -v libscalapack.a $LOCAL_INSTALL_PATH/lib cd .. # SuiteSparse cd SuiteSparse/SuiteSparse_config sed -re "s|^( *INSTALL_[^ ]+ *= *).*/([^/]+$)|\1$LOCAL_INSTALL_PATH/\2|;\ s|^( *(LAPACK\|BLAS) *= *)|\1-L$LOCAL_INSTALL_PATH/lib |;\ /^\s*#/! s| -O| -g -O|#;" \ SuiteSparse_config_linux.mk >SuiteSparse_config.mk cd .. make -j$ncpu library make install cd .. # HWLOC cd hwloc-2.5.0 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. ``` Now install poc-solvers : ```bash cd poc-solvers mkdir cmade-mpi cd cmade-mpi cmake ../src -DLOCAL_INSTALL=$LOCAL_INSTALL_PATH/ -DHIPS=NO -DMUMPS=NO -DPASTIX_5=NO -DPASTIX_6=NO -DPETSC=NO -DUMFPACK=NO -DARPACK=NO -DPARPACK=NO make -j$ncpu install cd ../.. ``` The tools will need several dependencies to be installed in *local* (comment the one you already have): ```bash #Download the tools librairies wget https://sqlite.org/2024/sqlite-autoconf-3460100.tar.gz wget http://download.osgeo.org/proj/proj-6.3.1.tar.gz wget http://ftpmirror.gnu.org/gsl/gsl-1.16.tar.gz wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.bz2 wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz wget https://confluence.ecmwf.int/download/attachments/45757960/eccodes-2.27.1-Source.tar.gz wget https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz wget http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.6.0.tar.gz wget https://github.com/LASzip/LASzip/releases/download/v2.2.0/laszip-src-2.2.0.tar.gz wget http://download.osgeo.org/liblas/libLAS-1.8.1.tar.bz2 # Unfold the librairies sources tar -xf sqlite-autoconf-3460100.tar.gz tar -xf proj-6.3.1.tar.gz tar -xf gsl-1.16.tar.gz tar -xf hdf5-1.10.6/src/hdf5-1.10.6.tar.bz2 tar -xf netcdf-c-4.9.2.tar.gz tar -xf eccodes-2.27.1-Source.tar.gz tar -xf gdal-3.7.3.tar.gz tar -xf libgeotiff-1.6.0.tar.gz tar -xf laszip-src-2.2.0.tar.gz tar -xf libLAS-1.8.1.tar.bz2 ### COMPILATION # SQLITE3 cd sqlite-autoconf-3460100 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. #PROJ (need sqlite3) cd proj-6.3.1 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. #GSL cd gsl-1.16 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. #ECCODES cd eccodes-2.27.1-Source mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL_PATH \ -DENABLE_{PYTHON,FORTRAN,NETCDF,JPG,AEC}=OFF make -j$ncpu make install cp -v lib/libgrib_api.so $LOCAL_INSTALL_PATH/lib/ cp -v ../src/grib_api.h $LOCAL_INSTALL_PATH/include/ cd ../../ # GDAL (need proj) cd gdal-3.7.3 #### WARNING Highly buggy version !! mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. # ln -s $CONDA_PREFIX/lib/libgdal.so $LOCAL_INSTALL_PATH/lib/libgdal.so #libGEOTIFF cd libgeotiff-1.6.0 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. # ln -s $CONDA_PREFIX/lib/libgeotiff.so $LOCAL_INSTALL_PATH/lib/libgeotiff.so #LASzip cd laszip-src-2.2.0 ./configure --prefix=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. # libLAS (need libgeotiff) cd libLAS-1.8.1 mkdir build cd build cmake .. -DGEOTIFF_INCLUDE_DIR=$LOCAL_INSTALL_PATH/include -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL_PATH make -j$ncpu make install cd .. ``` Now install poc-solvers : ```bash cd tools autoreconf -si # WARNING about pkg-config error during the configuration # if not found, try autoreconf -si -I/usr/share/aclocal # otherwise add pkg.m4 into $LOCAL_INSTALL_PATH/share/aclocal/ then run # autoreconf -si -I$LOCAL_INSTALL_PATH/share/aclocal #FOR MPI CALCULATION (cluster only) export CXX='mpicxx -std=gnu++11' rm -r parallel mkdir parallel cd parallel ../configure --with-parallel --prefix=$LOCAL_INSTALL_PATH POCSOLVERBUILDDIR=$INSTALL_PATH/poc-solvers/cmade-mpi ### for all the command (11Go) make -j$ncpu -k # ### for custom install # make -j$ncpu tools-config # for name in vertical-eigenmodes comodo-detidor showarg concatenator # do # make -j$ncpu $name # # rm $LOCAL_INSTALL_PATH/bin/$name # # ln -s $PWD/src/$name $LOCAL_INSTALL_PATH/bin/$name # done #verifier que le fichier ./src/tools-config exist #installation: exe_path=$PWD/src cp -v src/*.a $LOCAL_INSTALL_PATH/lib/ cp -s $exe_path/* $LOCAL_INSTALL_PATH/ubin/ rm $LOCAL_INSTALL_PATH/ubin/*.* cd ../../ #Cleaning to save some storage rm src/*.* ``` The POCViP will need several dependencies to be installed in *local* (comment the one you already have): ```bash ``` Now install POCViP : ```bash cd pocvip autoreconf -si # WARNING about pkg-config error during the configuration # if not found, try autoreconf -si -I/usr/share/aclocal # otherwise add pkg.m4 into $LOCAL_INSTALL_PATH/share/aclocal/ then run # autoreconf -si -I$LOCAL_INSTALL_PATH/share/aclocal rm -r fast mkdir fast cd fast #FOR STANDARD CALCULATION (PC) ../configure TOOLSCONFIG=$INSTALL_PATH/ubin/tools-config make -j $ncpu #installation: cp -s $PWD/pocvip $LOCAL_INSTALL_PATH/ubin/ ``` (container-install)= ## From containers images Docker and Apptainer/Singularity images are available upon request to [Simon Barbot](mailto:simon.barbot@utoulouse.fr). A proper upload will be made available in the future. Running containers require specific steps and privileges, so make sure you contacted the user service maintaining your computer/cluster, get the privilege to run containers and get the documentation of your cluster eventually. WARNING: A container is mounting the working directory (where you run the job) so you cannot access to the files that are in upper directories. Make sure to run a command pointing at files that are in this current directory or below. ### Install and command use with a Docker image Apptainer/Singularity image does not need to be added to your system before using it (but may need to be in a dedicated directory for clusters). Copy the image into your system: ```bash #Unpack and load image into your system VERSION=5803 tar -xvf sirocco-tools.$VERSION.docker.tar.gz docker image load -i sirocco-tools.$VERSION.docker.tar rm sirocco-tools.$VERSION.docker.tar #List the available images docker images ``` Then, to use the command from SIROCCO tools (anywhere): ```bash docker run -e LOCAL_UID=$(id -u) -e LOCAL_GID=$(id -g) ``` It will ask to run the from the image , mounting your directory from where you run this job. ### Install and command use with a Apptainer/Singularity image Apptainer/Singularity image does not need to be added to your system before using it (but may need to be in a dedicated directory for clusters). Copy the image into your system: ```bash containerDIR=/your/conteneurs/directory/ VERSION=5803 mv sirocco-tools.$VERSION.sif $containerDIR/ ``` Then, to use the command from SIROCCO tools (anywhere): ```bash singularity run -i --containall --env LOCAL_UID=$(id -u) --env LOCAL_GID=$(id -g) --bind $(pwd):/mnt $containerDIR/sirocco-tools.$VERSION.sif ``` It will ask to run the from the container, mounting your directory from where you run this job. (summit2)= ## On summit2 (LEGOS cluster) The last version of the software is available for direct use on this cluster with the following commands (you can add them to your .bash_profile): ```bash module use /ecola/share/modulefiles/ module load sirocco-gnu/latest ```