Submitting gridpack jobs on pbs cluster

Asked by celik

Dear Authors,

I am wondering if there is an instruction you can point to me for gridpack jobs on PBS cluster?

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Nothing that specific (also because pbs cluster are quite rare those days).

For cluster, you might need to customise the handling depending of your cluster policy.
In many cases, just modifying the input/mg5_configuration.txt and
setting up
run_mode to -1
cluster_type to pbs
and
cluster_queue to something appropriate for your cluster should run.

Now if your pbs is configured to required additional information then you will need to create a plugin to customize how your jobs are submitted.

For gridpack generation, you should have tutorial online,
but basically you just have to set in the run_card gridpack to True

Cheers,

Olivier

> On 16 Mar 2022, at 22:55, celik <email address hidden> wrote:
>
> New question #700960 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/700960
>
> Dear Authors,
>
> I am wondering if there is an instruction you can point to me for gridpack jobs on PBS cluster?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
celik (watzinki) said :
#2

Olivier thanks for your answer.

What I did was to set cluster mode "on" in mg5generataion.txt file and then generated a gridpack with setting the flag=true in the run.dat file. Although I selected Pythia8 to run through, I see that gridpack is generated at parton level only no Pythia run. I am wondering what might be causing the issue. If it is not an issue, then is there a way to submit jobs with gridpack on cluster but also running pythia8 as well?

This is a small cluster system I created. Each node is identical in terms of specifications with two CPUs , each has 2 cores. One thing I noticed that, jobs are running slower in the slave node than the master node(I set up master node as both slave and job scheduler node.).

Below is my submission script. For the gridpack cluster jobs, should I require one CPU per node? When I set #PBS -l select=1:ncpus=1, one of the slave nodes does not run jobs. Only accepts jobs one I request two CPUs for per chunk(select=1:ncpus=2).

Would appreciate any help.

Thanks in advance,

(using MG5_aMC_v2_9_3)

#!/bin/bash
#PBS -l select=1:ncpus=1:mem=2gb
#PBS -l walltime=400:0:0
#PBS -J 1-9:1
#PBS -S /bin/bash
#echo "Script begins here"

echo "Running on:"
cat ${PBS_NODEFILE}

echo "Program Output begins: "
cd $PBS_O_WORKDIR

mkdir $PBS_JOBID

chmod 700 $PBS_JOBID

cd $PBS_JOBID

scp /home/ali_0/Madgraph/MG5_aMC_v2_9_3/bin/ttbar_singlejet/pbs_calistirma/run_01_gridpack.tar.gz .

tar -xvf run_01_gridpack.tar.gz

./run.sh 100000 $PBS_ARRAY_INDEX

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

HI,

>What I did was to set cluster mode "on" in mg5generataion.txt file and then generated a gridpack with setting the flag=true in the run.dat file. Although I selected Pythia8 to run through, I see that gridpack is generated at parton level only no Pythia run. I am wondering what might be causing the issue. If it is not an issue, then is there a way to submit jobs with gridpack on cluster but also running pythia8 as well?

Are you using a framework that warp MG5aMC within some layer of interface?
I do not know a file name mg5generataion.txt (neither mg5generation.txt)
and we do not have a "on" for the cluster, the parameter to set is run_mode to be set on "1" inside the input/mg5_configuration.txt
Same for flag=True,we do not have any parameter in any file named flag.

Concerning pythia8, gridpack are designed to be fully standalone and try to avoid running any type of post-processing.
This is in particular true for madevent, where people running gridpack are typically running pythia8 by hand within their own framework (i.e. outside MG5aMC)

> For the gridpack cluster jobs, should I require one CPU per node?

So the run.sh job is designed for grid submission running on a single thread.
So yes the idea of that script is that you run thousands of them on your cluster(s) with typically for each of them a quite small number of requested number of events.

If I understand correctly your job, your are submitting 10 jobs of 100k events, I would rather advise to change that to 1k jobs of 1k events. Now this does not explain why one of your slave does not work, but I'm afraid that is a PBS issue on which I'm not qualified to help.

Cheers,

Olivier

Revision history for this message
celik (watzinki) said :
#4

Hi Olivier,

Thanks for the prompt reply!
Sorry for the confussion. My bad. I meant "mg5_configuration.txt" file inside the "input directory". I set in there run_mode=1 and gridpack= True in the run.dat card.

One more question, If I run jobs in cluster without gridpack, should I then need to execute "generate_events" in my submission script with qsub? With setting grid_pack=False in run card?

Thanks again,

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#5

> One more question, If I run jobs in cluster without gridpack, should I
> then need to execute "generate_events" in my submission script with
> qsub? With setting grid_pack=False in run card?

In that case, you will not need to write and pbs specific script since madgraph will write those for you.
When you run the generated code (in a way or another) (i.e. via the launch command or via the ./bin/generate_events) script
it will submit jobs on your cluster in the same way it was doing for the creation of your gridpack.

Cheers,

Olivier

> On 22 Mar 2022, at 17:05, celik <email address hidden> wrote:
>
> Question #700960 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/700960
>
> Status: Answered => Open
>
> celik is still having a problem:
> Hi Olivier,
>
> Thanks for the prompt reply!
> Sorry for the confussion. My bad. I meant "mg5_configuration.txt" file inside the "input directory". I set in there run_mode=1 and gridpack= True in the run.dat card.
>
> One more question, If I run jobs in cluster without gridpack, should I
> then need to execute "generate_events" in my submission script with
> qsub? With setting grid_pack=False in run card?
>
> Thanks again,
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
celik (watzinki) said :
#6

Thanks Olivier Mattelaer, that solved my question.