Project

General

Profile

Wiki » History » Version 9

Juan Alvarado, 09/01/2023 05:42 AM

1 1 Alexandre Camsonne
h1. Wiki
2
3 2 Juan Alvarado
To run PARTONS on the farm we need to do is to create a singularity container, follow these steps
4
* Set the environment and load the appropriate modules
5
source /site/env/syscshrc
6
module load singularity/3.9.5
7 1 Alexandre Camsonne
8 2 Juan Alvarado
* Build the container:
9
singularity build --sandbox partons_singularity docker://partons/partons
10 1 Alexandre Camsonne
11 2 Juan Alvarado
* The previous command with create a new folder called "partons_singularity". To run the container do: 
12
singularity shell --writable partons_singularity
13 1 Alexandre Camsonne
14 2 Juan Alvarado
* Now your terminal has changed. You can find PARTONS' folders in /root/workspace/
15
 
16 3 Juan Alvarado
* For instance, to run an example inside the container you can do:
17 2 Juan Alvarado
cd /root/workspace/partons-example/
18
./bin/PARTONS_example data/examples/gpd/computeSingleKinematicsForGPD.xml
19 1 Alexandre Camsonne
20 3 Juan Alvarado
* To run partons using a .xml outside the container (I am using computeSingleKinematicsForGPD.xml), we need to bind the folder on host to a folder on the container.
21
 1. I create a folder where the xml files are going to be linked on the container.
22
 mkdir partons_singularity/root/workspace/partons-example/input
23
 
24
 2. Create a script with the commands to run. I call it "order". The content of my file named "order" is:
25
   cd /root/workspace/partons-example/
26
   ./bin/PARTONS_example "path_to_xml_file"
27 1 Alexandre Camsonne
28 3 Juan Alvarado
 The script will change working directory on the container and will execute PARTONS. 
29 5 Juan Alvarado
 This script has to be located in your home directory (or any other mounted location e.g. input folder) and you need to give permissions using chmod 755 ~/order
30 3 Juan Alvarado
31 6 Juan Alvarado
 3. Then, execute PARTONS binding the folder containing the .xml file (on host) to the folder you have have just created (I created the folder input in the current location):
32 3 Juan Alvarado
 singularity exec --writable --bind ./input/:/root/workspace/partons-example/input/ partons_singularity/ ./order
33
34
 where the "path_to_xml_file" will be "input/computeSingleKinematicsForGPD.xml"
35
36
 For completeness, notice that the "order" file contains the following lines:
37
 cd /root/workspace/partons-example/
38
 ./bin/PARTONS_example input/computeSingleKinematicsForGPD.xml
39 4 Juan Alvarado
40
41 7 Juan Alvarado
 If you need to re-build the container and get the error "no space left on device", you just need to delete the folder .apptainer and .singularity in your home directory
42 8 Juan Alvarado
 If you get the error 
43
      ./bin/PARTONS_example: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory. 
44
 Do 
45
      strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
46 7 Juan Alvarado
47
48
To run EpIC, just copy the file epic_partons.tar.xz to the desired location and extract it with tar -xf
49
* singularity shell --writable --containall epic_partons (to enter the container)
50
* singularity exec --writable --containall --bind ./test/:/work/workspace/epic/test/ epic_partons run.sh (to bind a folder and use it as executable)
51 9 Juan Alvarado
52
A EpIC.txt file is left to guide the creation of the singularity container.
53
All libraries to be installed have to be done on a local computer with sudo permissions.
54
All commands have to be executed inside the container.
55 7 Juan Alvarado
 
56
57 3 Juan Alvarado
  
58 2 Juan Alvarado
*Some important links*
59 1 Alexandre Camsonne
https://partons.cea.fr
60 7 Juan Alvarado
https://pawelsznajder.github.io/epic/
61 2 Juan Alvarado
https://docs.sylabs.io/guides/3.0/user-guide/build_a_container.html
62
https://docs.sylabs.io/guides/2.6/user-guide/singularity_and_docker.html
63
https://singularity-tutorial.github.io/02-basic-usage/