LEDA 2016
Introduction
LEDA (Library of Efficient Data types and Algorithms) contains container data types like list, array, map, dictionary, priority queue, stack, queue, set, dynamic tree, etc, and basic data types such as searching and sorting algorithms, as well as numerically exact geometric algorithms, e.g. convex hull, delaunay triangulations, line segment intersection algorithms, boolean operations on polygons, Minkowski sum, and many more.
Using LEDA
To use LEDA load the module with
module load leda/6.3
which will also load the Gnu compilers (module GCC/5.4.0-2.26). You may change the compiler version by loading a different version (available versions can be found with module spider GCC.
Compiling Code
After you have loaded the module you can compile code using LEDA. A typical compile command could be (with a code copied from the LEDA demo directory):
cp $LEDAROOT/demo/numbers/Euler_demo.cpp . g++ -o Euler_demo Euler_demo.cpp -I$LEDAROOT/incl -L$LEDAROOT -lleda -lm -lX11
The variable $LEDAROOT is provided with the module, the linked libraries may differ for your application (the example is probably a minimal list of libraries needed).
Running Jobs with LEDA Codes
Since there many people working with the HPC cluster, its important that everyone has an equal chance to do so. Therefore, every job should be processed by SLURM.
For this reason, you have to create a jobscript for your tasks.
Example:
#!/bin/bash #SBATCG --partition=carl.p #SBATCH --ntasks=1 #SBATCH --mem=2G #SBATCH --time=0-2:00 #SBATCH --job-name EulerDemo #SBATCH --output=EulerDemo.%j.out module load leda/6.3 echo 50000 | ./Euler_demo
The job script runs the Euler_demo program once the requested resources can be allocated.