name 'function_library' is not defined

Bug #1745761 reported by Keping Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadDM
New
Undecided
Olivier Mattelaer

Bug Description

Hi guys, I am Keping Xie, working on implementation of new models called SCTM in MadDM. I generated the UFO file with SARAH and want to invoke MadDM to do Dark Matter study. The UFO file is attached, which works for MG5_aMC cross section calculations. However, when I work MadDM with the following commands,

./bin/maddm.py
import model SCTM -modelname
define darkmatter n1

It returns the following message.
Command "define darkmatter n1" interrupted in sub-command:
"import model /home/kepingx/MG5_aMC/MG5_aMC_v2_6_1/models/SCTM__REAL --modelname" with error:
NameError : name 'function_library' is not defined
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in 'MG5_debug'.
Please attach this file to your report.

Is this error related to the mass spectrum? My param_card.dat generated by SPheno is also included in the attachment.

I also tried Download the latest maddm_V2.1.1.tar.gz, and work in the un-tared directory with following procedure, which is also problematic.

Enter model name (press Enter to list the available models): SCTM
Enter project name (SCTM): SCTM_DM
Calculate relic density? [y] (y/n)y
Calculate direct detection cross sections? [y] (y/n)n
nEnter DM candidate (press Enter to automatically find the DM candidate):
 (Enter 'particles' to see a list of particles)
 *** Exclude particles via the standard MG "/" notation
n1
-------------------------------
DARK MATTER CANDIDATE:
-------------------------------
{
    'name': 'n1',
    'antiname': 'n1',
    'spin': 2,
    'color': 1,
    'charge': 0.00,
    'mass': 'mdl_MN1',
    'width': 'mdl_WN1',
    'pdg_code': 1000022,
    'line': 'swavy',
    'propagator': '',
    'is_part': True,
    'self_antipart': True,
    'type': '',
    'counterterm': {}
}
Enter the coannihilation particles:
(press Enter to automatically find the coannihilation particles)
(Enter 'particles' to see a list of particles)
n2
Would you like to edit the default param_card?[n] (y/n):
(or enter the location of param_card to be used)
y

Traceback (most recent call last):
  File "./maddm.py", line 23, in <module>
    dm.FindCoannParticles()
  File "/home/kepingx/MG5_aMC/MG5_aMC_v2_6_1/maddm/darkmatter.py", line 443, in FindCoannParticles
    self.ChangeParamCard(prompts)
  File "/home/kepingx/MG5_aMC/MG5_aMC_v2_6_1/maddm/darkmatter.py", line 535, in ChangeParamCard
    self._fullmodel.set_parameters_and_couplings(param_card=self._paramcard)
  File "/home/kepingx/MG5_aMC/MG5_aMC_v2_6_1/models/model_reader.py", line 162, in set_parameters_and_couplings
    raise MadGraph5Error, msg
madgraph.MadGraph5Error: Invalid restriction card (not same block)
    set(['ye', 'umix', 'tu', 'snumix', 'uulmix', 'sphenolowenergy', 'fwcoef', 'msu2', 'loopmsoft', 'gauge', 'nmix', 'lsp', 'msd2', 'chargemix', 'phases', 'sminputs', 'msl2', 'decay', 'higgslhc14', 'minpar', 'selmix', 'flavorkitqfv', 'higgslhc13', 'doublechargemix', 'higgslhc8', 'effhiggscouplings', 'td', 'te', 'higgslhc7', 'usqmix', 'imfwcoef', 'uelmix', 'spheno', 'imnmix', 'msoft', 'msq2', 'higgsfcc100', 'dsqmix', 'yd', 'modsel', 'treemsoft', 'yu', 'mse2', 'pseudoscalarmix', 'none', 'gaugegut', 'uurmix', 'udlmix', 'extpar', 'vmix', 'udrmix', 'imphases', 'mass', 'uermix', 'flavorkitlfv', 'hmix', 'scalarmix']) != set(['imyu', 'umix', 'imudlmix', 'snumix', 'imuelmix', 'imuurmix', 'msoft', 'doublechargemix', 'imvmix', 'imyd', 'imte', 'imdoublechargemix', 'uulmix', 'effhiggscouplings', 'chargemix', 'imnmix', 'phases', 'udrmix', 'decay', 'tu', 'selmix', 'imsnumix', 'imuulmix', 'immsoft', 'td', 'te', 'imtd', 'usqmix', 'imselmix', 'uelmix', 'dsqmix', 'imudrmix', 'ye', 'yd', 'imhmix', 'imuermix', 'imtu', 'sminputs', 'yu', 'pseudoscalarmix', 'imye', 'none', 'uurmix', 'udlmix', 'imumix', 'imusqmix', 'vmix', 'nmix', 'imphases', 'mass', 'imdsqmix', 'uermix', 'hmix', 'scalarmix']).
    Missing block: imyu,imye,imtd,imte,imselmix,imuelmix,imuurmix,imudrmix,imudlmix,imsnumix,imumix,imhmix,imusqmix,imvmix,imyd,imtu,imdoublechargemix,imdsqmix,imuulmix,immsoft,imuermix
    Unknown block : sphenolowenergy,fwcoef,msu2,loopmsoft,gauge,lsp,msd2,msl2,higgslhc14,minpar,flavorkitqfv,higgslhc13,higgslhc8,higgslhc7,imfwcoef,spheno,higgsfcc100,modsel,treemsoft,mse2,gaugegut,extpar,msq2,flavorkitlfv

So, what is the reason for this problem? Is my UFO file not compatible with MadDM?

Best regards,
Keping

Tags: sctm ufo
Revision history for this message
Keping Xie (kepingx) wrote :
Changed in maddm:
assignee: nobody → Olivier Mattelaer (olivier-mattelaer)
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

Sorry for getting back to you so late.
We notice a miss-configuration in our bug tracker and notice this report only today.

At first look this seems to be an issue on how SARAH generates the model.
The error :
NameError : name 'function_library' is not defined
seems related to the fact that
__init__.py does not have the line import function_library
Actually, FeynRules also does not include this line and I do not understand how this does not make FeynRules model to crash. (the latest version of FR fixes that issue)

Sorry for the very long delay,

Olivier

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.