[Gate-users] mpi in SLURM CLUSTER using GATE

Consuelo Guardiola guardiola at imnc.in2p3.fr
Mon May 20 16:07:31 CEST 2019


Hi Deae, 

Below you may find a mail loop regarding a similar question. 

Best, 
Consuelo 



------------------------------------------------------------------------------------ 

Hi Meryem, 

You are welcome. 

The last part is the execution of Gate of ALL the jobs that are inside .Gate/folder. It is: when you, first, export GC_DOT_GATE_DIR = /home/m.fiak/mywork and right after make ¨gjs -c openmosix -n 100 main.mac" (assuming that you are splitting100 jobs, for example, of a main job called "main.mac"), it will create a folder of split jobs inside .Gate/main/ path automatically, i.e. main1.mac, main2.mac, main3.mac...to main100.mac. Therefore, the script 

#!/bin/bash 
Gate .Gate/main/main$ (($SLURM_PROCID+1)).mac 

runs Gate of ALL the main1.mac, main2.mac....to main100.mac of the 100 split jobs above. 

Try it and let me know if it works, 
Best 
Consuelo 


De: "meryem fiak" < fiakmeryem.13 at gmail.com > 
À: "Consuelo Guardiola" < guardiola at imnc.in2p3.fr > 
Envoyé: Samedi 23 Mars 2019 17:42:12 
Objet: Re: [Gate-users] GATE ON CLUSTER 

Hi Consuelo, 
Thank you so much for your reply and reactivity. I understood that I have to export GC_DOT_GATE_DIR. to my working directory as indicated in the GATE users guide, but I didn't completely understand the last part : 
------------------------------------------------------------------ 
#!/bin/bash 
Gate .Gate/main/main$ (($SLURM_PROCID+1)).mac 
------------------------------------------------------------------- 


Here is my working directory: /home/m.fiak/mywork. 
Here is my script Job.sl that I use for running GATE in sequential mode. 
=================================================================== 
#!/bin/bash 
#SBATCH -J GATE-Jobs 
#SBATCH -o %x-%j.out 
#SBATCH -e %x-%j.err 
#SBATCH --partition=mediumq 

ml xerces-c/gcc/64 
ml qt/gcc/64 
ml geant4/gcc/64/4.10.04.p02 
ml root/gcc/64/6.14.02 
ml gate/gcc/64/8.1.p01 



mkdir -p $PWD/$SLURM_JOB_ID 
cp $PWD/*.mac $PWD/*.db $PWD/$SLURM_JOB_ID 
cd $PWD/$SLURM_JOB_ID 
Gate main.mac 
===================================================== 

Best Regards. 

Le ven. 22 mars 2019 à 11:34, Consuelo Guardiola < [ mailto:guardiola at imnc.in2p3.fr | guardiola at imnc.in2p3.fr ] > a écrit : 



Hi Meriem, 

I'm using a HPC platform with SLURM, which is not a problem for GATE submission jobs since it is just an utility for batch processing. A job (i.e. one of the files in which you split your main macro file) is the execution unit for SLURM. To ensure the proper scheduling of jobs, you have to fit together nodes and cores that can be used at the same time in a group (number of total jobs). 

That said, you may split your macro as usual with the gjs splitter tool (***Note: before it, you must export GC_DOT_GATE_DIR= "where_you_want_to_store_the_data"). Then, you can launch your jobs using "sbatch" command as follows: 

> sbatch "job_script" 

where your "job_script" can be something like this (e.g. 480 jobs): 
----------------------------------------------------------------- 
#!/bin/bash 
#SBATCH --ntasks 480 
#SBATCH --qos=prace 
#SBATCH --time=24:00:00 
#SBATCH --job-name=O 
#SBATCH --output=c_%j.out 
#SBATCH --error=c_%j.err 

srun ./Beam.sh 
----------------------------------------------------------------- 

in turn, "Beam.sh" file is: 

------------------------------------------------------------------ 
#!/bin/bash 
Gate .Gate/main/main$(($SLURM_PROCID+1)).mac 
------------------------------------------------------------------- 

which executes Gate for all your jobs that are into .Gate/ folder (pointed at ***) 


I hope it works! 

Best, 
Consuelo 







De: "Grevillot Loic" < [ mailto:loic.grevillot at medaustron.at | loic.grevillot at medaustron.at ] > 
À: "meryem fiak" < [ mailto:fiakmeryem.13 at gmail.com | fiakmeryem.13 at gmail.com ] > 
Cc: "gate-users" < [ mailto:gate-users at lists.opengatecollaboration.org | gate-users at lists.opengatecollaboration.org ] > 
Envoyé: Vendredi 22 Mars 2019 10:56:41 
Objet: Re: [Gate-users] GATE ON CLUSTER 



Dear Meriem, 



please always use the GATE mailing-list. For cluster business, I am sure you will find much more experienced users than I am… 



Best, 

Loïc 



From: meryem fiak [mailto: [ mailto:fiakmeryem.13 at gmail.com | fiakmeryem.13 at gmail.com ] ] 
Sent: Freitag, 22. März 2019 00:02 
To: Grevillot Loic < [ mailto:loic.grevillot at medaustron.at | loic.grevillot at medaustron.at ] > 
Subject: GATE ON CLUSTER 




Hello, 


I'm a phd student in medical physics and I have a question regarding "Running GATE on a cluster". 


I'm working on MC simulation of linacs in radiotherapy via GATE/GEANT4 platforme and i'm hoping to use the gjs Gate jobsplitter on a cluster (parallel mode), but the cluster uses Slurm which does not belong to the 4 clusterplatform listed by GATE ( HT Condor, openPBS, openmosix and Xgrid). 





I would like to know how can I split my Gate macros into several jobs using slurm (job scheduler). 


I already posted the problem in Gate-users list forum but I haven't received any response. 


Thank you so much for your help. 





Kind regards. 








-- 


Ms . FIAK Meriem 


------------------------------------------------------------------- 


Job Title: Phd Student 


-------------------------------------------------------------------- 


Hassan II University of Casablanca 


Faculty of sciences Ben M'sik 


Department of physics 


Laboratory of the Physics of Condensed Matter (LPMC) 


Team of Subatomic and Applications Research (ERSA) 


--------------------------------------------------------------------- 


E-mail: [ mailto:fiakmeryem.13 at gmail.com | fiakmeryem.13 at gmail.com ] 


Disclaimer: 
Please notice our E-Mail Disclaimer [ http://www.medaustron.at/email-disclaimer/ | http://www.medaustron.at/email-disclaimer/ ] 


_______________________________________________ 
Gate-users mailing list 
[ mailto:Gate-users at lists.opengatecollaboration.org | Gate-users at lists.opengatecollaboration.org ] 
[ http://lists.opengatecollaboration.org/mailman/listinfo/gate-users | http://lists.opengatecollaboration.org/mailman/listinfo/gate-users ] 





-- 
Ms . FIAK Meriem 
------------------------------------------------------------------- 
Job Title: Phd Student 
-------------------------------------------------------------------- 
Hassan II University of Casablanca 
Faculty of sciences Ben M'sik 
Department of physics 
Laboratory of the Physics of Condensed Matter (LPMC) 
Team of Subatomic and Applications Research (ERSA) 
--------------------------------------------------------------------- 
E-mail: [ mailto:fiakmeryem.13 at gmail.com | fiakmeryem.13 at gmail.com ] 


De: "Deae Eddine" <eddinedeae at gmail.com> 
À: gate-users at lists.opengatecollaboration.org 
Envoyé: Lundi 20 Mai 2019 14:33:09 
Objet: [Gate-users] mpi in SLURM CLUSTER using GATE 

Hello 
[ https://www.researchgate.net/post/How_can_I_do_parallel_computing_in_SLURM_using_MPI_platform_GATE | How can I do parallel computing in SLURM using MPI <<platform GATE>> ? ] 
I split a macro to 10 part, and i need to run all these macros with a lot of jobs using MPI on the same script ? 
Best regards 

-- 
============================== == 
Mr. Deae-eddine KRIM 
Physics department 
Laboratory of Physics of Matter and Radiations 
Faculty of Sciences, University Mohammed First Oujda Morocco 
Bvd Mohamed VI, Oujda 
------------------------------ ------------------------- 
Tel: +212 6 36866827 
============================== == 

_______________________________________________ 
Gate-users mailing list 
Gate-users at lists.opengatecollaboration.org 
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190520/7a5d9e1b/attachment-0001.html>


More information about the Gate-users mailing list