Skip to content

Commit

Permalink
simplify the runcmsgrid patch for compatibility purpose (106X)
Browse files Browse the repository at this point in the history
  • Loading branch information
colizz committed Jun 29, 2020
1 parent 87f7acd commit 8786954
Showing 1 changed file with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
--- runcmsgrid.sh 2020-05-01 03:27:51.000000001 +0200
+++ runcmsgrid.sh 2020-05-02 10:46:24.000000001 +0200
@@ -43,6 +43,30 @@
fi
cd $LHEWORKDIR

@@ -48,1 +48,25 @@
+# test if the current file system allow setting folder permission to read-only.
+succ_setreadonly=true
+mkdir testpermit
Expand All @@ -24,17 +21,12 @@
+fi
+
+if fs listacl &>/dev/null; then
+ fs sa -dir process/madevent -acl ${USER} all
+ fs sa -dir madevent -acl ${USER} all
+else
+ chmod +w process/madevent
+ chmod +w madevent
+fi
cd process

#make sure lhapdf points to local cmssw installation area
@@ -56,6 +80,18 @@
echo "nb_core = $ncpu" >> ./madevent/Cards/me5_configuration.txt
#fi

@@ -59,3 +83,15 @@
+function event_generate_per_thread () {
+
+# number of event to generate and seed in this thread
Expand All @@ -50,19 +42,10 @@
#########################################
# FORCE IT TO PRODUCE EXACTLY THE REQUIRED NUMBER OF EVENTS
#########################################
@@ -95,7 +131,7 @@
# run mg5_amc
echo "produced_lhe " $produced_lhe "nevt " $nevt "submitting_event " $submitting_event " remaining_event " $remaining_event
echo run.sh $submitting_event $run_random_seed
@@ -98,1 +134,1 @@
- ./run.sh $submitting_event $run_random_seed
+ ../process/run.sh $submitting_event $run_random_seed

# compute number of events produced in the iteration
produced_lhe=$(($produced_lhe+`zgrep \<event events.lhe.gz | wc -l`))
@@ -121,6 +157,56 @@
mv events_${run_counter}.lhe.gz events.lhe.gz
fi

@@ -124,3 +160,53 @@
+cd $LHEWORKDIR
+
+} ### end of function
Expand Down

0 comments on commit 8786954

Please sign in to comment.