2323 import madgraph .various .banner as banner_mod
2424
2525class CPPMEInterface (madevent_interface .MadEventCmdShell ):
26-
2726 def compile (self , * args , ** opts ):
2827 """ """
29-
3028 import multiprocessing
3129 if not self .options ['nb_core' ] or self .options ['nb_core' ] == 'None' :
3230 self .options ['nb_core' ] = multiprocessing .cpu_count ()
33-
3431 if args and args [0 ][0 ] == 'madevent' and hasattr (self , 'run_card' ):
3532 import pathlib
3633 import os
3734 pjoin = os .path .join
38-
39-
40-
41-
4235 cudacpp_backend = self .run_card ['cudacpp_backend' ].upper () # the default value is defined in banner.py
4336 logger .info ("Building madevent in madevent_interface.py with '%s' matrix elements" % cudacpp_backend )
4437 if cudacpp_backend == 'FORTRAN' :
@@ -54,15 +47,12 @@ def compile(self, *args, **opts):
5447 return misc .compile (nb_core = self .options ['nb_core' ], * args , ** opts )
5548
5649class CPPRunCard (banner_mod .RunCardLO ):
57-
5850 def reset_simd (self , old_value , new_value , name ):
5951 if not hasattr (self , 'path' ):
6052 raise Exception
61-
6253 if name == "vector_size" and new_value <= int (old_value ):
6354 # code can handle the new size -> do not recompile
6455 return
65-
6656 Sourcedir = pjoin (os .path .dirname (os .path .dirname (self .path )), 'Source' )
6757 subprocess .call (['make' , 'cleanavx' ], cwd = Sourcedir , stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL )
6858
@@ -72,33 +62,31 @@ def plugin_input(self, finput):
7262 def default_setup (self ):
7363 super ().default_setup ()
7464 self .add_param ('cudacpp_backend' , 'CPP' , include = False , hidden = False )
75-
7665
7766 def write_one_include_file (self , output_dir , incname , output_file = None ):
7867 """write one include file at the time"""
79-
8068 if incname == "vector.inc" and 'vector_size' not in self .user_set :
8169 return
8270 super ().write_one_include_file (output_dir , incname , output_file )
8371
84-
8572 def check_validity (self ):
8673 """ensure that PLUGIN information are consistent"""
87-
8874 super ().check_validity ()
89-
9075 if self ['SDE_strategy' ] != 1 :
9176 logger .warning ('SDE_strategy different of 1 is not supported with SMD/GPU mode' )
9277 self ['sde_strategy' ] = 1
93-
9478 if self ['hel_recycling' ]:
9579 self ['hel_recycling' ] = False
9680
9781class GPURunCard (CPPRunCard ):
98-
9982 def default_setup (self ):
10083 super (CPPRunCard , self ).default_setup ()
10184 self .add_param ('cudacpp_backend' , 'CUDA' , include = False , hidden = False )
102-
85+
86+ #class CUDACPPRunCard(CPPRunCard):
87+ # def default_setup(self):
88+ # super(CPPRunCard, self).default_setup()
89+ # self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False)
90+
10391MEINTERFACE = CPPMEInterface
10492RunCard = CPPRunCard
0 commit comments