"Invalid instruction" when passing code to SLURM cluster
Hi!
I'm trying to submit to the lemaitre3 cluster a python3 code which computes matrix elements for four-jet events, but the job fails due to an "invalid instruction" in my code, which I paste at the end of the post. The code runs normally both on my laptop and on the front-end of the cluster.
Can you give me any hints about what's wrong?
Here's my code:
import sys
sys.path.append ('/home/
sys.path.append ('/home/
sys.path.append ('/home/
import allmatrix2py
import madgraph.
import madgraph.
import myfunctions as myf
from itertools import permutations
import time
import numpy as np
allmatrix2py.
lhe = lhe_parser.
lhapdf = misc.import_
# Getting a PDF member object
pdf = lhapdf.
ELHC = 6.5e3
FactScale = 5e2
sphercut = 0.36
#-------main
pdg_list = [list of all the possible subprocesses' pdg lists]
me_pos = 0
me_neg = 0
sigma_meas = 0.
sigma_meas_sph = 0.
nev = 0
start_t = time.time ()
for event in lhe:
nev += 1
if nev%1000. == 0:
elapsed = (time.time () - start_t)/60
minu, sec = myf.time_conversion (elapsed)
print (nev, minu, 'min', sec, 'sec')
weight = myf.math.fabs (event.wgt)
p = []
p_final = []
pdgl = []
#pT = []
for particle in event:
mom = [particle.E, particle.px, particle.py, particle.pz]
p.append (mom)
pdgl.append (particle.pdg)
if particle.status == 1:
spher = myf.transv_spher (p_final)
P = myf.invert_momenta (p)
#calculating the weighted matrix element
ans_int = 0.
for pdgl in pdg_list:
for pdgl_in in permutations (pdgl[:2]):
pdfw = pdf.xfxQ(
ans = 0
for pdgl_out in permutations (pdgl[2:]):
ans += allmatrix2py.
ans_int += (ans * pdfw) / 6.
#Counting events
sigma_meas += event.wgt * np.sign (ans_int)
sigma_meas_sph += event.wgt * np.sign (spher - sphercut)
print ('sigma meas:', sigma_meas)
print ('sigma spher:', sigma_meas_sph)
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Olivier Mattelaer
- Solved:
- Last query:
- Last reply: